I had created webservice using jaxws
in myeclipse5.1.1GA
and I can call this webservice method in eclipse indigo64 bit
.
Problem is that when I can set parameters of webmethod which is in webservice
using soap object's setparameter()
method but it is not set in webservice's webmethod.
how to set parameter:
public class MyAsyncTask extends AsyncTask<String, Void, Object> {
private String METHOD_NAME="";
private String NAMESPACE="http://ws.easyway3e.com/";
private String SOAP_ACTION="";
private static final String URL="http://10.0.2.2:8080/WebService/DBConn?wsdl";
@Override
protected Object doInBackground(String... params) {
System.out.println("Call-1 -----"+params[0]+","+params[1]+",
"+params[2]+","+params[3]);
METHOD_NAME="openConnection";
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty(DRIVERNAME);
request.addProperty("d_Name",params[0]);
request.addProperty("c_String",params[1]);
request.addProperty("u_Name",params[2]);
request.addProperty("pass",params[3]);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope
(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
System.out.println(envelope.bodyOut.toString());
HttpTransportSE androidHttpTranportSE=new HttpTransportSE(URL);
androidHttpTranportSE.setXmlVersionTag("<?xml version=\"1.0\"
encoding=\"UTF-8\"?>");
try {
SOAP_ACTION = NAMESPACE + METHOD_NAME;
androidHttpTranportSE.call(SOAP_ACTION, envelope);
SoapPrimitive resultsRequestSOAP = (SoapPrimitive) envelope.getResponse();
System.out.println(" Connection is =>"+resultsRequestSOAP.toString());
} catch (IOException e) { e.printStackTrace(); }
Object result = null;
try { result = envelope.getResponse(); }
return result;
}