Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » WCF Services
WCF Services [message #869690] Thu, 03 May 2012 20:39 Go to next message
Jose Ortega is currently offline Jose OrtegaFriend
Messages: 2
Registered: May 2012
Junior Member
Hi all,

I am new to the Eclipse/Android world. I have been developing in C# and VB.NET for some time and coming from a Microsoft Visual Studio to an Eclipse environment I think will be challenging. C# and Java are very similar, however.

Anyway, my question is this.

I am developing my first android application, which will be using web services to retrieve data from SQL. I found some articles on the Internet and followed them through; however, when I debug the android application, it does not seem to work. I followed this walk through.

fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx

The line that fails is the one below.

HttpResponse result = httpClient.execute(request);

Any help would be appreciated.

Thanks in advance.
Re: WCF Services [message #869905 is a reply to message #869690] Fri, 04 May 2012 17:53 Go to previous messageGo to next message
Jose Ortega is currently offline Jose OrtegaFriend
Messages: 2
Registered: May 2012
Junior Member
O.K found the solution by doing some internet searching. The code below needed to be added to the "onCreate" event.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//This code needed to be added here.
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.build());

}

Hope this helps somebody facing the same issue.
Re: WCF Services [message #869976 is a reply to message #869905] Sat, 05 May 2012 11:59 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/04/2012 11:53 AM, Jose Ortega wrote:
> O.K found the solution by doing some internet searching. The code below
> needed to be added to the "onCreate" event.
>
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> //This code needed to be added here.
> StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
> .detectDiskReads() .detectDiskWrites() .detectNetwork() .penaltyLog()
> .build()); }
>
> Hope this helps somebody facing the same issue.
Except that this isn't an Android support forum. Your post would likely
help someone if it were on stackoverflow or one of the Android forums.
Previous Topic:any gui window in open view
Next Topic:java disappeared after being there for some days
Goto Forum:
  


Current Time: Sat Apr 27 00:51:09 GMT 2024

Powered by FUDForum. Page generated in 0.08058 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top