Comments (12)
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.
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.
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.
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.
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.
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.
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.
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.
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.
[deleted comment]
from ksoap2-android.
@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.
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)
- StreamBody from WSDL via soap HOT 1
- Option to not produce a SOAP Header on the request HOT 3
- java.io.EOFException : ReadasciiLine HOT 2
- xmlpullparser not wrok HOT 3
- KPCS12 and Ksoap2 HOT 1
- Calling wcf service with wsHttpBinding thrown an exception when security is enabled in wcf service. HOT 1
- red demo came on my tablet cant remove it HOT 1
- HttpsTransportSE completely ignores Proxy HOT 3
- envelope headerOut. headerIn function will crash on platform of hTC M8 with lollipop version HOT 10
- Improvement: Explicitly call "disconnect" HOT 1
- EOF Exception Ksoap2-3.4.0 HOT 11
- NoSuchMethods on Lollipop 5.0.2 HTC HOT 1
- Is there support to create WSDL stub code ? HOT 1
- IOException no response no call just IOEXception HOT 3
- Вifferentiate timeout for read response and timeout for connection HOT 1
- I/O error during system call, Connection reset by peer HOT 1
- Move project to Github HOT 3
- Unable to remove 'n0' prefix from header element HOT 1
- Complex data request in Android (java) HOT 2
- Remove header tag from request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksoap2-android.