Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 让KSoap2 android与ReliableSession(WS-ReliableMessaging)一起工作_Java_Android_Wcf_Web Services_Android Ksoap2 - Fatal编程技术网

Java 让KSoap2 android与ReliableSession(WS-ReliableMessaging)一起工作

Java 让KSoap2 android与ReliableSession(WS-ReliableMessaging)一起工作,java,android,wcf,web-services,android-ksoap2,Java,Android,Wcf,Web Services,Android Ksoap2,我尝试将我的android应用程序连接到我的web服务。 android使用ksoap2 android作为库,我的web服务是一个.NET WCF 我的Web服务配置: <wsHttpBinding> <binding name="wsHttpBindingConfiguration" useDefaultWebProxy="false" maxReceivedMessageSize="2147483647" receiveTimeout="00:40:00" ope

我尝试将我的android应用程序连接到我的web服务。 android使用ksoap2 android作为库,我的web服务是一个.NET WCF

我的Web服务配置:

<wsHttpBinding>
    <binding name="wsHttpBindingConfiguration" useDefaultWebProxy="false" maxReceivedMessageSize="2147483647" receiveTimeout="00:40:00" openTimeout="00:40:00" closeTimeout="00:40:00" sendTimeout="00:40:00">
        <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        <security mode="None" />
        <reliableSession inactivityTimeout="24:00:00" enabled="true" />
    </binding>
</wsHttpBinding>
getResponse()
throw:
code:s:Sender,原因:操作http://tempuri.org/IService1/Register 此终结点不支持。此端点仅处理WS-ReliableMessaging 2005年2月消息。

如果我禁用了
reliableSession
我的代码工作,但我需要为我的项目启用它:(

有人找到了一种方法让ksoap2 android与
reliableSession
一起工作,还是ksoap2无法做到

编辑:
在使用wireshark之后,我看到webService正在等待另一个命令来启动会话,然后才能使用包含uid会话的普通命令。
我认为重写我自己的reliableSession更容易,它试图用java/ksoap2 android模拟“WS-ReliableMessaging”。

我也有同样的问题。如果运气好,请与大家分享
final String SOAP_ACTION = "http://tempuri.org/IService1/Register";
final String METHOD_NAME = "Register";
final String NAMESPACE = "http://tempuri.org/";
final String URL = "http://10.0.0.1:6474/Server";

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

Element e = new Element();
e.setName("To");
e.setNamespace("http://www.w3.org/2005/08/addressing");
e.addChild(Node.TEXT, URL);


Element e1 = new Element();
e1.setName("Action");
e1.setNamespace("http://www.w3.org/2005/08/addressing");
e1.addChild(Node.TEXT, SOAP_ACTION);

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
        SoapEnvelope.VER12);

PropertyInfo info = null;
info = new PropertyInfo();
info.namespace="http://tempuri.org/";
info.name="eventObjectUri";
info.type=PropertyInfo.STRING_CLASS;
info.setValue("Qing");
request.addProperty(info);

envelope.dotNet = true;
envelope.setOutputSoapObject(request);
envelope.headerOut = new Element[] { e, e1 };


androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive result = (SoapPrimitive)envelope.getResponse();