- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我做了一个简单的项目来使用 ksoap2 调用 wcf web 服务。但是当它调用信封.getResponse();它给出了错误的说法————–
“SoapFault – faultcode: ‘a:ActionNotSupported’ faultstring: ‘The message with Action ‘GetString’ cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).’ faultactor: ‘null’ detail: null”
我在本地主机上运行网络服务。
请帮我一些
我分配的值是否正确,
private static final String SOAP_ACTION = “GetString”;
private static final String OPERATION_NAME = “GetString”;
private static final String WSDL_TARGET_NAMESPACE = “http://tempuri.org/”;
private static final String SOAP_ADDRESS = “http://10.0.2.2:14089/Service1.svc?wsdl”;
最佳答案
我们不知道这些值是否正确 - WSDL 应该告诉您调用 GetString
操作的正确 SOAP 操作是什么。
在网络浏览器中打开 WSDL(即您在 SOAP_ADDRESS
中分配的地址)并找到如下内容:
<wsdl:binding name="..." type="...">
...
<wsdl:operation name="GetString">
<soap:operation soapAction="HERE_IS_CORRECT_ACTION" />
<wsdl:input>...</wsdl:input>
<wsdl:output>...</wsdl:output>
</wsdl>
...
</wsdl:binding>
顺便说一句。当您调用该服务时,您应该使用不带 ?wsdl
查询字符串的 URL。
关于Android 与 WCF Web 服务使用 ksoap2 - 错误 SoapFault - 故障代码 : ‘a:ActionNotSupported’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6522789/
我是一名优秀的程序员,十分优秀!