I need to call to a SAP web service using android to get material no using material document no. I am using ksoap2 library. Problem is I don't what exactly the NAMESPACE, SOAP_ACTION mean. I cannot get any response.
METHOD_NAME = "ZSL_GET_MAT_DOC";
URL = "http://SL_S:****@AP.vv.lk:8000/sap/bc/srt/rfc/sap/zsl_get_mat_doc/110/zsl_get_mat_doc/zl_web_svr4";
This is my method.
class RetrieveFeedTask extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... strings) {
// Create SOAP request
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("Materialdocument", "0407000147");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
// Get response from envelope
Object result = envelope.getResponse();
// Display result
Toast.makeText(getContext(), result.toString(), Toast.LENGTH_LONG).show();
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
return null;
}
}