bagi-code / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

org.xmlpull.v1.XmlPullParserException: expected: START_TAG #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
<b>What steps will reproduce the problem?</b>
1. Invoke the webservice with the following code
<pre>
SoapObject request = new SoapObject("http://ws.comun.telefonia.millenium.com/", 
methodName);

SoapSerializationEnvelope envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11);
//envelope.setAddAdornments(false);
//envelope.dotNet=true;
//envelope.encodingStyle = SoapSerializationEnvelope.ENC2001;
envelope.setOutputSoapObject(request);

HttpTransportSE androidHttpTransport = new 
HttpTransportSE("http://192.168.39.52:8080/wsdl/WebServiceTelefonia.wsdl",900000
);

androidHttpTransport.debug=true;

try {
    androidHttpTransport.call("http://ws.comun.telefonia.millenium.com/getUsuariosTelefonia", envelope);            
} catch (Exception e) {
    //String a1 = envelope.bodyIn;
    //String a = androidHttpTransport.requestDump;
    //String b = androidHttpTransport.responseDump;
    System.out.println(e);
}
</pre>

What is the expected output? What do you see instead?
An array of objects as defined in the wsdl, but instead i get 
org.xmlpull.v1.XmlPullParserException: expected: START_TAG 
{http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG 
<{http://www.w3.org/2001/XMLSchema}xs:complexType 
name='usuarioTelefoniaDTO'>@4:44 in java.io.InputStreamReader@483b3f78) 

<b>What version of the product are you using? On what operating system?</b>
ksoap2-android-assembly-2.5.7-jar-with-dependencies.jar
Windows 7 Professional x32

Please provide any additional information below.
The requestDump is
<pre>
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:d="http://www.w3.org/2001/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header 
/><v:Body><n0:getUsuariosTelefonia 
xmlns:n0="http://ws.comun.telefonia.millenium.com/" /></v:Body></v:Envelope>
</pre>

The bodyIn is null.

Consuming the service with the same wsdl using SoapUI, i get the response just 
fine as in the attached file output.txt

Original issue reported on code.google.com by victor.h...@gmail.com on 26 Jul 2011 at 12:39

Attachments:

GoogleCodeExporter commented 8 years ago
Do not use bodyIn.. call envelope.getResponse()

Original comment by mosa...@gmail.com on 2 Aug 2011 at 5:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Invalid use of the library.. it should use just fine.

Original comment by mosa...@gmail.com on 23 Aug 2011 at 5:16