Hi.
I am am trying to connect to a SOAP web service using ksoap2 library. I have read a bunch of docs about it, but i am stuck as my request is not an ordinary one.
I need to specify some headers prior to sending the request.
when is use a soap client to test the webservice i also need to put this in the soap enveope header section:
<SOAP-ENV:Header>
<mns:AuthIn xmlns:mns="http://enablon/wsdl/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<UserInfo xsi:type="wsdlns:AuthHeader">
<EnaHomeSite xsi:type="xsd:string">sss</EnaHomeSite>
<EnaUserName xsi:type="xsd:string">sadsa</EnaUserName>
<EnaPassword xsi:type="xsd:string">qwertf</EnaPassword>
</UserInfo>
</mns:AuthIn>
</SOAP-ENV:Header>
The rest of my code is similar to this approach
The emulator takes a bit of time to precess so i assume it contacts the server, but the call to ...call crases with:
org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG </{http://schemas.xmlsoap.org/soap/envelope/}SOAP-ENV:Fault>@1:505 in java.io.InputStreamReader@43ef45e8)
My question is how do i attach the header mentioned above to my request?
I didn't manage to fine nice doc for ksoap. maybe some tutorials or examples. can anyone point me to some docs. I have found the javadoc, but it is rather thin.
I have also tried to format my own raw HTTP request. (managed to do so on iPhone and it works just fine). However i can't seem to be able to add the body of the request in. I mean the big soap xml containing all headers namespaces and required data for the call. Any pointer on this direction would be also much appreciated.
Thanks a lot, guys.
Cheers, Alex