2

I am using ksop2 dependency ***(compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.0')***for hitting soap web service , but getting below exception.

Exception - SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request. ---> wwdjwdwdewwes' faultactor: 'null' detail: org.kxml2.kdom.Node@3303970c

JAVA CODE

      private final SoapSerializationEnvelope getSoapSerializationEnvelope(SoapObject request) {
            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            envelope.dotNet = true;
            envelope.implicitTypes = true;
            envelope.setAddAdornments(false);
            envelope.setOutputSoapObject(request);

            return envelope;
        }

        private final HttpTransportSE getHttpTransportSE() {
            HttpTransportSE ht = new HttpTransportSE(Proxy.NO_PROXY,MAIN_REQUEST_URL,60000);
            ht.debug = true;

            return ht;
        }

SoapSerializationEnvelope envelope = getSoapSerializationEnvelope(request);
      HttpTransportSE ht = getHttpTransportSE();

       ht.call(SOAP_ACTION, envelope);
       // testHttpResponse(ht);
        received = (SoapObject) envelope.getResponse();

1 Answer 1

1

Its because you are sending some thing null in envelope.

if (envelope.bodyIn instanceof SoapFault) {
    SoapFault soapFault = (SoapFault) envelope.bodyIn;
    String requestStr = androidHttpTransport.requestDump;

} else {
    SoapObject soapObject = ((SoapObject) envelope.bodyIn);
    String requestStr = androidHttpTransport.requestDump;
}

check your request in requestStr and comment received = (SoapObject) envelope.getResponse();

Sign up to request clarification or add additional context in comments.

9 Comments

Yes SoapObject innerText is null
for now add dummy value in innerText and check its working or not
Now getting error "Server was unable to process request. ---> wwdjwdwdewwes"
ht.call(MAIN_REQUEST_URL + "/"+SOAP_ACTION, envelope); or check SOAP_ACTION
not working - SoapFault - faultcode: 'soap:Client' faultstring: 'Server did not recognize the value of HTTP Header SOAPAction: 4.......asmx/http://tempuri.org/readUser.' faultactor: 'null' detail: org.kxml2.kdom.Node@3307c43c
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.