Git Product home page Git Product logo

Comments (12)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I have the same problem with WCF service. Similar .NET web-Service (.asmx) 
works fine.
Does anybody know how to solve this?

Original comment by [email protected] on 26 Sep 2010 at 4:16

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
What kind of data is the WCF service returning?
Can you call the endpoint using the WCF Service Test Client?
Can you host in a Windows service instead of IIS?

I have a demo service that returns a List<Order> from an Entity Framework 
model. The WCF Service Test Client refuses to call it, complaining that it 
returns an Order[]. It returns an empty response object to Android which 
triggers the XmlPullParser: unexpected type exception.

I changed the service to return a List<OrderMirror> where OrderMirror is a POCO 
that 'mirrors' the properties of the Order class and is decorated with 
DataContract and DataMember attributes. I use some code to create the 
List<OrderMirror> collection and return that from the service. The WCF Service 
Test Client will now consume it and it returns a proper response object to 
Android. I'm also hosting this demo service in a console app rather than IIS; 
it should work as a Windows Service as well. This is .NET 4.0 with EF4, BTW.

Based on my research I'm not sure it's a ksoap2-android problem as it looks 
like many platforms have the problem (Blackberry programmers seem to run into 
it frequently.) Depending on how your services are architected you may have to 
write wrappers around them to support Android clients. If you're going to have 
to do that you might want to consider using JSON instead (which is much lighter 
than SOAP.)

Original comment by [email protected] on 30 Sep 2010 at 3:08

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Hell, Riger.

> What kind of data is the WCF service returning?

namespace SampleService
{
    [ServiceContract]
    public interface ISampleService
    {
        [OperationContract]
        double Add(double a, double b, String c);
    }
}

> Can you call the endpoint using the WCF Service Test Client?

As far as I can see from MSDN, WCF service test client should come with VS but 
my VS distro does not contain this tool. I can access this service from other 
.NET app.

> Can you host in a Windows service instead of IIS?

I'm hosting WCF service in console application, not in IIS.

---
In fact, I'm trying to access simplest service which returns standard data 
types but have no success with this.

> If you're going to have to do that you might want to consider using JSON 
instead (which is much lighter than SOAP.)

I need a functionality which will allow to notify all connected clients on some 
events (e.g functionality similar to chat, when server receives a message, it 
re-sends it to all connected clients. I'm not sure that if I use JSON API and 
will not keep connection open, I will be able to have such functionality.

I can upload the source code of my Java test app and WCF service if needed.

Thanks.

Original comment by [email protected] on 30 Sep 2010 at 3:43

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Normally WCF won't keep any connection open. It's designed that the client 
requests some data from the service (perhaps sending some as well) then the 
service responds and the connection closes. I believe the type of connection 
you are speaking about is what's called a Duplex WCF Service 
(http://msdn.microsoft.com/en-us/library/ms731064.aspx) in which both the 
client and server can initiate a connection to the other party. I've never 
built one of these so I don't know the details of them and I certainly don't 
know how Android would fit in the picture. I would imagine there would be 
battery issues and loss-of-connection handling issues.

WCF Service Test client should be in C:\Program Files (x86)\Microsoft Visual 
Studio 10.0\Common7\IDE\WcfTestClient.exe. It's included in my VS2010 
Professional; if you only have the Express version it's possible it's not 
included there.

Json vs. Soap is irrelevant; neither keeps a connection open. They are simply 
the means to communicate the data.

Original comment by [email protected] on 30 Sep 2010 at 7:55

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Hello ddudl..gmail.com
 Would you post the reguarl asmx.
 using kSOAP i code build and permissions also , but still the Envelope is null.
 and cant get it working
 Can you send code which is working with asmx

 Rayudu Addagarla

Original comment by [email protected] on 3 Jan 2012 at 7:20

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Don't think I ever got ksoap to work right in this situation.  I no longer
have access to the code I created.  Sorry!

Original comment by [email protected] on 4 Jan 2012 at 1:58

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I have the same problem with android 2.2 but not with android 4.0.3...

see : 
http://stackoverflow.com/questions/8969893/android-ksoap-2-2-6-web-service-with-
android-2-2-version-ko-and-not-with-andro

Original comment by [email protected] on 23 Jan 2012 at 10:41

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I have the same issue when using android 2.2 and a SVC file, major annoying.. 
:-(

Original comment by [email protected] on 13 Feb 2012 at 8:32

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
It seems to be working from posts on stackoverflow and other places so this is 
not a ksoap issue as far as I can tell. 

Original comment by [email protected] on 30 Apr 2012 at 6:22

  • Changed state: Invalid

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
@jacek.makiela .. is this your app? and is it using ksoap2-android?

Original comment by [email protected] on 7 Sep 2012 at 10:08

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Check out the application WCF Tester and WCF Tester Pro for debugging. It uses 
ksoap2-android and works with WCF services. See more at 
http://code.google.com/p/ksoap2-android/wiki/ProjectsUsingKsoap2Android

Original comment by [email protected] on 13 Sep 2012 at 5:09

from ksoap2-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.