通过 Android 连接 Soap Service 时出错
我想尝试(并且几乎崩溃)的是通过android连接到soap服务。这是我的代码:
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addPropterty("###", "###");
request.addProperty("user", "####");
request.addProperty("pwd", "####");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
androidHttpTransport.debug = true;
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject) envelope.getResponse();
String resultData = response.getProperty("ort").toString();
我的私人信息是:
private static String SOAP_ACTION = "http://tempuri.org/Finder/Finder/###";
private static String NAMESPACE = "http://tempuri.org/Finder/Finder/";
private static String METHOD_NAME = "get##XY";
private static String URL = "http://###.at/###/Finder/Finder.asmx";
在我想要获得响应的行中,我收到以下错误:
SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request. ---> Value cannot be null.
我几乎尝试了所有内容并在论坛等中阅读了很多内容,但无法找到任何对我有帮助的内容。我尝试将 dotNet 变量设置为 true/false、androidHttpTransport.debug true/false、setXmlVersionTag yes/no...
任何人都可以帮助我吗?
What i want to try (and nearly flipping out) is to connect to a soap service via android. Here is my code:
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addPropterty("###", "###");
request.addProperty("user", "####");
request.addProperty("pwd", "####");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
androidHttpTransport.debug = true;
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject) envelope.getResponse();
String resultData = response.getProperty("ort").toString();
My privates are:
private static String SOAP_ACTION = "http://tempuri.org/Finder/Finder/###";
private static String NAMESPACE = "http://tempuri.org/Finder/Finder/";
private static String METHOD_NAME = "get##XY";
private static String URL = "http://###.at/###/Finder/Finder.asmx";
In the line where i want to get the Response, i get the following error:
SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request. ---> Value cannot be null.
I nearly tried everything and read a lot in forums and so on but wasn´t able to find anything that helped me. I tried to set the dotNet variable to true/false, androidHttpTransport.debug true/false, setXmlVersionTag yes/no...
Can ANYBODY help me please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论