我正在尝试连接此网络服务
但是当我开始时,服务没有响应,没有任何答案。
我可以用我的代码调用其他服务,但这有些不同
因为在方法名称之后<tem:request>
,我认为我的请求不正确
如果有人帮忙谢谢
<soapenv:Header/> <soapenv:Body>
<tem:GetCityList>
<!--Optional:-->
<tem:request>
<ver:discardHistoryLoggingField>true</ver:discardHistoryLoggingField>
<ver:callIDField>123</ver:callIDField>
<ver:cardNumberField>123</ver:cardNumberField>
<ver:channelIDField>123</ver:channelIDField>
<ver:customerNumberField>123</ver:customerNumberField>
<ver:dateField>06/10/11 15:24:17</ver:dateField>
<ver:deviceBrandField>12</ver:deviceBrandField>
<ver:deviceModelField>ios</ver:deviceModelField>
<ver:deviceOSField>ios</ver:deviceOSField>
<ver:deviceTypeField>sum</ver:deviceTypeField>
<ver:iPNoField>111111122</ver:iPNoField>
<ver:idField>3</ver:idField>
<ver:phoneNumberField>5415132442</ver:phoneNumberField>
<ver:userCodeField>23</ver:userCodeField>
</tem:request>
</tem:GetCityList> </soapenv:Body> </soapenv:Envelope>
这是我的服务,所有参数都在另一个请求标签中。我的代码
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo fromProp =new PropertyInfo();
fromProp.setName("discardHistoryLoggingField");
fromProp.setValue(true);
fromProp.setType(String.class);
request.addProperty(fromProp);
PropertyInfo toProp6 =new PropertyInfo();
toProp6.setName("deviceOSField");
toProp6.setValue("Java");
toProp6.setType(String.class);
request.addProperty(toProp6);
// countune to create property...
PropertyInfo toProp8 =new PropertyInfo();
toProp8.setName("userCodeField");
toProp8.setValue("0");
toProp8.setType(String.class);
request.addProperty(toProp8);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.implicitTypes = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try{
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
webResponse = response.toString();
这里有东西
请求不正确,所以当我运行应用程序时什么也没有发生