XmlPullParserException expected with Ksoap2
Asked Answered
K

0

0

I encounter a lot of difficulty when using a Soap request in my android app. I use Ksoap2 library. I already created a post about it where you can see my code here

I try modify my constant like this:

public final static String SOAP_ACTION = "http://xmlns.oracle.com/orawsv/USER/WSS_USER_CLI/GETARTICLE/";
public final static String NAME_SPACE = "http://xmlns.oracle.com/orawsv/USER/WSS_USER_CLI/GETARTICLE";
public final static String URL = "https://xxx.xxx.xxx.xxx:1443/orawsv/USER/WSS_USER_CLI/GETARTICLE?wsdl";
public final static String GET_ARTICLE_METHOD_NAME = "GETARTICLE";
public final static String GET_ARTICLE_SOAP_ACTION = SOAP_ACTION + GET_ARTICLE_METHOD_NAME;

But now I have this error message:

> 07-13 11:17:33.163 3355-4210/com.ablinfo.mweb W/System.err: org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='GETARTICLE' targetNamespace='http://xmlns.oracle.com/orawsv/USER/WSS_USER_CLI/GETARTICLE'>@6:56 in java.io.InputStreamReader@b3b2c69) 
07-13 11:17:33.164 3355-4210/com.ablinfo.mweb W/System.err:     at org.kxml2.io.KXmlParser.require(KXmlParser.java:2065)
        at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:128)
        at org.ksoap2.transport.Transport.parseResponse(Transport.java:129)
        at org.ksoap2.transport.HttpTransportSE.parseResponse(HttpTransportSE.java:301)
        at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:274)
        at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
        at com.ablinfo.mweb.service.WebServiceCall.callWSThreadSoapPrimitive(WebServiceCall.java:62)
        at com.ablinfo.mweb.service.GetArticleTask.doInBackground(GetArticleTask.java:36)
07-13 11:17:33.165 3355-4210/com.ablinfo.mweb W/System.err:     at com.ablinfo.mweb.service.GetArticleTask.doInBackground(GetArticleTask.java:11)
        at android.os.AsyncTask$2.call(AsyncTask.java:295)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
Kitchener answered 13/7, 2018 at 12:42 Comment(5)
I have also same problem ,you can see my complete answer #51256457Cullet
Thank you for your answer. I try to use httpClient but I have the error ": Error sending SOAP request javax.net.ssl.SSLHandshakeException: Handshake failed. " I think this problem is with HTTPS. How can I solve this problem?Kitchener
How can I check my Parameters are correct for the SOAP? I Think my values of NAMESPACE, ACTION, METHOD and URL are wrong.Kitchener
if you want to use my way of coding then you have to simply use library httpclient and httpcore and ksoap2 android library ... and for the soapAction and url you can check your xml or you can discuss with your backened team..they will tell you exactly what should be SoapAction and URL should .. you have to simply follow my way of coding and you will surely get the result.Cullet
I posted my code following your way of coding.Kitchener

© 2022 - 2024 — McMap. All rights reserved.