Android with WCF web service using ksoap2 - error SoapFault – faultcode: ‘a:ActionNotSupported’
Asked Answered
F

2

6

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”;
Fusil answered 29/6, 2011 at 15:0 Comment(0)
L
12

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.

Lucienlucienne answered 29/6, 2011 at 15:47 Comment(2)
Thank you very much Ladislav Mrnka... :))))Fusil
Thank you so much man. For this I wasted 2 days. Thank you againRatsbane
G
2

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.

Galton answered 24/8, 2016 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.