Note that there are some explanatory texts on larger screens.

plurals
  1. POUpload a file From android using WCF service and Ksoap2
    primarykey
    data
    text
    <p>I have developed a WCF Service .NET4 (SOAP) and I am trying to consume it from Android. But the problem that i get this error:</p> <blockquote> <p>org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG @1:761 in java.io.InputStreamReader@437c3ff0)</p> </blockquote> <p>in this line:</p> <pre><code>androidHttpTransport.call(SOAP_ACTION, envelope); </code></pre> <p>Here is my code:</p> <pre><code>private static final String SOAP_ACTION = "http://tempuri.org/OCRWebService/extractText"; private static final String METHOD_NAME = "extractText"; private static final String NAMESPACE = "http://tempuri.org/"; private static final String URL = "http://10.0.2.2/ocrwebservice/Service.svc"; private String extractText(byte[] _data){ try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); PropertyInfo p1=new PropertyInfo(); p1.setName("image2up"); p1.setType(_data); request.addProperty(p1); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet=true; envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); androidHttpTransport.debug=true; androidHttpTransport.call(SOAP_ACTION, envelope); // error here SoapObject result=(SoapObject)envelope.getResponse(); String resultData=result.getProperty(0).toString(); } catch (Exception e) { Log.i("123",e.getMessage()); } return "false"; </code></pre> <p>}</p> <p>(For information: I want to upload a file from android device to my server using wcf servcice)</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.
    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