简体   繁体   中英

KSOAP 2 Android conusming WCF Service using wsHttpBinding with http

While using KSOP2 to manage SOAP in Android and WCF Service that I am consuming in my Android project (using wsHttpBiniding with http transfer protocol) I am getting this error:

Code: s:Sender, Reason: The message could not be processed. This is > most likely because the action > ' http://tempuri.org/IMyServiceOne/MethodOneTest ' is incorrect or > because the message contains an invalid or expired security context > token or because there is a mismatch between bindings. The security > context token would be invalid if the service aborted the channel due > to inactivity. To prevent the service from aborting idle sessions > prematurely increase the Receive timeout on the service endpoint's > binding.

I am struck on this from last few days and try every possible way, but could not succeed. I am a bit new to Android. Please help me regarding how to consume .NET WCF Services with wsHttpBinding using http transfer protocol in Android using ksop2.

wsHttpBinding by default uses WS-Addressing specification and because of this it requires some additional SOAP header values. You can of course manually add required headers in your code but this will take some time (SoapEnvelope has a headerOut array which you can use to set headers required by WS-Addressing). You can also use http://easywsdl.com generator to generate appropriate classes. I know that it supports WS-Addressing specification.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM