Android Unmarshalling Error: unexpected element (uri:“url”, local:“scope”). Expected elements are <{-Collection of common programming errors
I am trying to consume SOAP
webservices in Android
and writing own code for doing so: Below is my code
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addSoapObject(getScopeBean());
request.addSoapObject(getLocaleBean());
request.addProperty("commercialRef","somevalidvalue" );
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
String xsd = envelope.XSD;
Log.e("envelop ", xsd);
envelope.setOutputSoapObject(request);
envelope.implicitTypes = true;
envelope.setAddAdornments(false);
HttpTransportSE http = new HttpTransportSE(URL, 2000);
http.call(SOAP_ACTION, envelope);
String requestDump = http.requestDump;
Log.e("requestDump", requestDump);
String responseDump = http.responseDump;
Log.e("responseDump", responseDump);
My request xml is
somevalidname
WW
somevalidname
GB
en
somevalidname
and response is
soap:Client
Unmarshalling Error: unexpected element
(uri:"http://", local:"scope").
Expected elements are <{}rangeId>,<{}scope>,<{}commercialRef>,<{}locale>
I have been tryin to fix it from 3 days and no success. Can anybody please help in fixin it. I would be great. In soap ui the wsdl works fine. In wsdl file the method
I have confirmed methodname, namespace, url which i gave is correct. If anybody gets what I am doing incorrect way. Please suggest.
Thanks, Android developer