My requirement is to call a web service from Android and display the result in a nice manner.
But inside the web service's WSDL I don't find a SOAPAction
. The WSDL looks like this:
<operation name="getStudentList">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
Is there any way to find the SOAPAction
in some other places inside the WSDL? Can I call the web service and get a result without the SOAPAction
?
SOAPAction. The SOAPAction header is a transport protocol header (either HTTP or JMS). It is transmitted with SOAP messages, and provides information about the intention of the web service request, to the service. The WSDL interface for a web service defines the SOAPAction header value used for each operation.
The soapAction url can be found in WSDL Document. This command is similar as post(url,payload,var) command.
Overview. The SOAPAction filter enables you to identify an incoming XML message based on the SOAPAction HTTP header in the message. The SOAPAction filter applies to SOAP 1.1 and SOAP 1.2. The following example illustrates how to locate the SOAPAction header in an incoming message.
No. The SOAPAction HTTP header is required by SOAP 1.1 and therefore by the WSA. It can be blank or have a value, but the HTTP header has to be there. Also, take a look at the service's WSDL, and if it includes "soapAction" then the client must meet the API's specification.
The SOAPAction
is required for SOAP 1.1 over HTTP but it's hard to say what the behavior of your web service will be if you don't send a proper header. The web service may return a fault if it's missing the SOAPAction
(or if it has an unexpected value) or it might do nothing at all.
The WSDL is the place to find the value to use for the SOAPAction
, inside the <soap:operation>
. If it's not specified for an operation or it's like in the example you posted (soapAction=""
) you normally need to add this to the request headers:
SOAPAction: ""
Try with an empty quoted string and it should work.
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