i am using KSOAP2 to consume SAP web service
this is the success request and response
REQUEST
<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>
<urn:SdRfcCustomerGet xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<CustomerT>
<item>
<Kunnr></Kunnr>
<Anred></Anred>
<Name1></Name1>
<Pfach></Pfach>
<Stras></Stras>
<Pstlz></Pstlz>
<Telf1></Telf1>
<Telfx></Telfx>
<Ort01></Ort01>
</item>
</CustomerT>
<Kunnr>0000491100</Kunnr>
<Name1></Name1>
</urn:SdRfcCustomerGet>
</v:Body>
</v:Envelope>
RESPONSE
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
<n0:SdRfcCustomerGetResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<CustomerT>
<item>
<Kunnr>0000491100</Kunnr>
<Anred/>
<Name1>Customer Company 02</Name1>
<Pfach>127 353</Pfach>
<Stras>Sheikh Zayed Road</Stras>
<Pstlz/>
<Ort01>Berlin</Ort01>
<Telf1/>
<Telfx/>
</item>
</CustomerT>
</n0:SdRfcCustomerGetResponse>
</soap-env:Body>
</soap-env:Envelope>
This is the request and response generated by my Android code
REQUEST
<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>
<SdRfcCustomerGet xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<CustomerT>
<item>
<Kunnr></Kunnr>
<Anred></Anred>
<Name1></Name1>
<Pfach></Pfach>
<Stras></Stras>
<Pstlz></Pstlz>
<Telf1></Telf1>
<Telfx></Telfx>
<Ort01></Ort01>
</item>
</CustomerT>
<Kunnr>0000491100</Kunnr>
<Name1></Name1>
</SdRfcCustomerGet>
</v:Body>
</v:Envelope>
RESPONSE
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Server</faultcode>
<faultstring xml:lang="en">Processing Error. More details in WS Error Log (transaction SRT_UTIL) by selection with UTC timestamp 20131202115430 </faultstring>
<detail/>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
the error generated in eclipse
SoapFault - faultcode: 'soap-env:Server' faultstring: 'Processing Error. More details in WS Error Log (transaction SRT_UTIL) by selection with UTC timestamp 20131202115430 ' faultactor: 'null' detail: org.kxml2.kdom.Node@41c9e4a0
error on server
----ERROR_TEXT Element 'CustomerT' missing
the line i need to change in request is this
<SdRfcCustomerGet xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
i need to change it to ( i want to add ns1 or urn or n0 before function name )
<ns1:SdRfcCustomerGet xmlns:ns1='urn:sap-com:document:sap:soap:functions:mc-style'>
can anyone help me with this
i have been stuck for a week now
I managed to solve it that way
SoapObject request = new SoapObject("", "urn:" + WS_METHOD_NAME);
request.addAttribute("xmlns:urn", WS_NAMESPACE);