I have done a simple project to call wcf web service using ksoap2. But when it calls envelope.getResponse(); it gives error saying ————–
“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”
I’m running web service in localhost.
please help me some one
is this values correct that I have assigned,
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”;
We don't know if these values are correct - WSDL should tell you what is correct SOAP action for calling the GetString
operation.
Open WSDL in web browser (that is the address you are assigning in SOAP_ADDRESS
) and find something like:
<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>
Btw. when you call the service you should use URL without ?wsdl
query string.
You can also check the actionName using SoapUI. First generate example request by providing wsdl address and then find your request. When you find it, select the "Raw" tab on the left side of window with request. You can find there http headers. One of the header position is "SOAPAction". It is the name which we are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With