android - 如何解决android中的SOAP Error 500

标签 android soap wsdl

如何在 Android 的 wsdl Web 服务中找出 SOAP_NAMESPACE、SOAP_ACTION、SOAP_METHOD_NAME

我的网络服务如下:

http://demo.ecount.in/eService.svc?wsdl

请知道的 friend 帮帮我

谢谢。

我的代码如下:

public final static String URL = "http://demo.ecount.in/eService.svc?wsdl";
public static final String NAMESPACE = "http://tempuri.org/";
public static final String SOAP_ACTION_PREFIX = "urn:eService/ExcuteDataSet1";
private static final String METHOD = "ExcuteDataSet1";

private String resp;

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
            SoapObject request = new SoapObject(NAMESPACE, METHOD);
            //bodyOut is the body object to be sent out with this envelope
            envelope.bodyOut = request;
            HttpTransportSE transport = new HttpTransportSE(URL);
            try {
                transport.call(NAMESPACE + SOAP_ACTION_PREFIX + METHOD, envelope);
            } catch (IOException e) {
                e.printStackTrace();
                Log.e("Error", e.toString());
            } catch (XmlPullParserException e) {
                e.printStackTrace();
                Log.e("Error XmlPullParserException", e.toString());
            }
            //bodyIn is the body object received with this envelope
            if (envelope.bodyIn != null) {
                //getProperty() Returns a specific property at a certain index.
                SoapPrimitive resultSOAP = (SoapPrimitive) ((SoapObject) envelope.bodyIn)
                        .getProperty(0);
                resp=resultSOAP.toString();
            }

它给出错误:“HTTP 请求失败,HTTP 状态:500”

最佳答案

请检查下面的快照以了解 SOAP_NAMESPACE、SOAP_ACTION、SOAP_METHOD_NAME

enter image description here

关于android - 如何解决android中的SOAP Error 500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27563023/

相关文章:

java - 将简单的 json 解析为微调器条目

android - 长按 EditText 时触发广播接收器

soap - SoapUI 中请求的并行执行

c# - PHP SOAP 不断返回旧结果

c# - 将 WSDL 添加到项目只会创建类型,不会进入 app.config 并引发三个错误

Python Spyne - SOAP 服务器 - 不需要此元素。预期是({http ://} Element_name )

java - 安卓 : Perform a task while application opened for first time alone?

android - 如何在不连接BLE设备的情况下持续获取RSSI?

.net - SOAP 不一致? Delphi 2010 (Win32) 服务器和 .NET 客户端交换 'out-parameter' 和 'result'

java - 从 WSDL 文件生成 Web 服务