Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find SOAPAction from a WSDL

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?

like image 840
Crime Master Gogo Avatar asked Jan 11 '13 08:01

Crime Master Gogo


People also ask

What is SOAPAction in WSDL?

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.

How do I get a SOAP action URL?

The soapAction url can be found in WSDL Document. This command is similar as post(url,payload,var) command.

What is SOAPAction in HTTP header?

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.

Is SOAPAction mandatory?

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.


Video Answer


1 Answers

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.

like image 69
Bogdan Avatar answered Sep 23 '22 14:09

Bogdan