• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps I Need Help with access Web Service!!!

wajardo

Lurker
I have a little Program, that... is connected with the Web Service "obtener detalles", this is stopped in the httpTransportSe...


Copy and Paste the library KSOAP2 in the folder Libs....
Platform 4.0.3 and the API LEVEL is 15....
Please Help me!!!!
 
The code:


public class AccesoWebService {



public SoapObject usarWebService1P(String METHOD_NAME,String parametro) throws IOException, XmlPullParserException
{

String NAMESPACE = "WS.DESA.cl";
String URL="http://pda.desa.cl/webserviceVenta/Service.asmx";
String SOAP_ACTION = "WS.DESA.cl/"+METHOD_NAME;

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

PropertyInfo pi = new PropertyInfo();

pi.setName("ot");
pi.setValue(parametro);
pi.setType(PropertyInfo.STRING_CLASS);

request.addProperty(pi);



Log.d("COMPROBANDO VALOR","" );

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
//envelope.bodyOut=request;
envelope.dotNet = true;

envelope.setOutputSoapObject(request);

HttpTransportSE transporte = new HttpTransportSE(URL);


transporte.call(SOAP_ACTION,envelope);



return (SoapObject)envelope.getResponse();



}
}
 
Back
Top Bottom