我是安卓新手。在我的应用程序中,我尝试调用 SOAP Web 服务,因为我不明白这是什么意思
对于(SOAP_Action,OperationName,WSDL_TARGET_NAMESPACE,SOAP_ADDRESS)。以下是我的完整代码
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView textView = new TextView(this);
setContentView(textView);
SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,
OPERATION_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
System.out.println("subbu="+request);
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
try
{
httpTransport.call(SOAP_ACTION, envelope);
Object response = envelope.getResponse();
textView.setText(response.toString());
}
catch (Exception exception)
{
textView.setText(exception.toString());
}
}
}
任何人都可以解释那是什么目的。提供一些链接,我可以从中得到想法。