I have an app that connects to a webservice in .NET. The connection is ok. I don’t get any error or exception, but always get the same: anyType {Id=null}.
The method gets 2 parameters usuario and password, but no matter what I send I always get the same.
Here is my code:
private static final String METHOD_NAME = "usuarioLogeadoSOAP_XML";
private static final String SOAP_ACTION = "http://xxxx/webdav/testapp/usuarioLogeadoSOAP_XML";
private static final String NAMESPACE = "http://xxxx/webdav/testapp";
private static final String URL = "http://xxxx/testapp/Service.asmx";
try{
result=soap(METHOD_NAME, SOAP_ACTION, NAMESPACE, URL);
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
public SoapObject soap(String METHOD_NAME, String SOAP_ACTION, String NAMESPACE, String URL) throws IOException, XmlPullParserException
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("usuario", "roman");
request.addProperty("password", "hernandez");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(URL);
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION, envelope);
SoapObject result=(SoapObject)envelope.getResponse();
return result;
}
ok i found the solution, whit .NET is necessary to add this line
and voila, now is working.