error expected: START_TAG

2689 views
Skip to first unread message

Ademar Alves de Oliveira

unread,
Jun 23, 2012, 7:17:11 PM6/23/12
to ksoap2-...@googlegroups.com
Hi All I'm using the KSOAP2 2.6.5 but I also used 2.4 until the 2.6.5 and i received the same error:

org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='wsLogin' targetNamespace='http://painel01.allinmail.com.br/wsAllin/login.php'>@2:403 in java.io.InputStreamReader@4375ba18) 

I tried the solution but so far have not found anything to solve

my code:

private String METHOD = "getTicket";

private static final String NAMESPACE = "http://painel01.allinmail.com.br/wsAllin/login.php";
private static final String SOAP_ACTION = "http://painel01.allinmail.com.br/wsAllin/login.php#getTicket";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SoapObject request = new SoapObject(NAMESPACE, METHOD);
request.addAttribute("login", "testeallin");
request.addAttribute("senha", "allin@teste456");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
log("point A");
androidHttpTransport.call(SOAP_ACTION, envelope);
log("point B");
String resultsRequestSOAP = envelope.getResponse().toString();
log("point C");
log(resultsRequestSOAP);
} catch (Exception e) {
e.printStackTrace();
log(e.toString());
}

}

private void log(String msg) {
Log.d("KSOAP2", msg);
}

and my responce is only:

point A
org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='wsLogin' targetNamespace='http://painel01.allinmail.com.br/wsAllin/login.php'>@2:403 in java.io.InputStreamReader@4375ba18) 

how to I Can fixed it?

Luiz Aoqui

unread,
Aug 24, 2012, 5:56:16 PM8/24/12
to ksoap2-...@googlegroups.com
I am also having this problem.

Have you found a solution?

Manfred Moser

unread,
Aug 24, 2012, 6:01:56 PM8/24/12
to ksoap2-...@googlegroups.com
What are your request and response dumps.. are they non-null and valid xml?

Luiz Aoqui

unread,
Aug 24, 2012, 6:12:34 PM8/24/12
to ksoap2-...@googlegroups.com
Yes, both are not-null and valid XML.

The weird part is that the response dump is exactly my WSDL and if I copy and paste the request dump on some program like soapUI I get the right response.

Manfred Moser

unread,
Aug 24, 2012, 6:25:20 PM8/24/12
to ksoap2-...@googlegroups.com
The response dump should not be the wsdl but an actual response.. you
must have something misconfigured

Luiz Aoqui

unread,
Aug 24, 2012, 6:31:46 PM8/24/12
to ksoap2-...@googlegroups.com
Yeah, I thought so...

Do you have any idea of what may cause the server to respond with the WSDL?

I have a really simple call, something like this https://gist.github.com/3456479

I think my NAMESPACE, URL, METHOD_NAME and SOAP_ACTION are correct, otherwise the request dump wouldn't work on soapUI.

Manfred Moser

unread,
Aug 24, 2012, 6:34:41 PM8/24/12
to ksoap2-...@googlegroups.com
Not really... it seem valid what you got.

Luiz Aoqui

unread,
Aug 24, 2012, 6:45:40 PM8/24/12
to ksoap2-...@googlegroups.com
Ok, thanks for your help.

I will try some other stuffs, maybe I am missing a header or something.

samira haguouche

unread,
Feb 17, 2013, 1:58:21 PM2/17/13
to ksoap2-...@googlegroups.com
Hi,
I have the same problem. did you found the solution
thanks

Luiz Aoqui

unread,
Feb 17, 2013, 11:06:01 PM2/17/13
to ksoap2-...@googlegroups.com
Hi Samira,

it was a while ago but I pretty sure I gave up trying to use kSOAP and decided to implement a parser by hand.

Sorry I couldn't offer you any help.



--
You received this message because you are subscribed to the Google Groups "ksoap2-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ksoap2-androi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

samira haguouche

unread,
Feb 19, 2013, 3:18:54 AM2/19/13
to ksoap2-...@googlegroups.com
Hi,
never mind.. thank you for the answer

2013/2/18 Luiz Aoqui <lgf...@gmail.com>

Amit Tomar

unread,
Oct 27, 2015, 1:52:18 AM10/27/15
to ksoap2-android
It seems that you are using wrong SOAP_ACTION or Namespace  and nothing else just check at glance in both of this . 
Reply all
Reply to author
Forward
0 new messages