Note that there are some explanatory texts on larger screens.

plurals
  1. POSOAP web service on android
    primarykey
    data
    text
    <p>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.</p> <p>I need to specify some headers prior to sending the request.</p> <p>when is use a soap client to test the webservice i also need to put this in the soap enveope header section:</p> <pre><code>&lt;SOAP-ENV:Header&gt; &lt;mns:AuthIn xmlns:mns="http://enablon/wsdl/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;UserInfo xsi:type="wsdlns:AuthHeader"&gt; &lt;EnaHomeSite xsi:type="xsd:string"&gt;sss&lt;/EnaHomeSite&gt; &lt;EnaUserName xsi:type="xsd:string"&gt;sadsa&lt;/EnaUserName&gt; &lt;EnaPassword xsi:type="xsd:string"&gt;qwertf&lt;/EnaPassword&gt; &lt;/UserInfo&gt; &lt;/mns:AuthIn&gt; &lt;/SOAP-ENV:Header&gt; </code></pre> <p>The rest of my code is similar to <a href="http://android.amberfog.com/?p=45" rel="nofollow noreferrer">this</a> approach</p> <p>The emulator takes a bit of time to precess so i assume it contacts the server, but the call to ...call crases with:</p> <pre><code>org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG &lt;/{http://schemas.xmlsoap.org/soap/envelope/}SOAP-ENV:Fault&gt;@1:505 in java.io.InputStreamReader@43ef45e8) </code></pre> <p>My question is how do i attach the header mentioned above to my request?</p> <p>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.</p> <p>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.</p> <p>Thanks a lot, guys.</p> <p>Cheers, Alex</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload