SXI Forum

A place to collect usefull tips, tricks and implementation strategies.

You are not logged in.

#1 21-11-2018 10:30:18

SeanR
Administrator
Registered: 20-11-2018
Posts: 148

SOAPWebService connector and the SOAPAction explained

Whilst working with one of our clients using the XLayer SOAPWebService connector to consume their SOAP web Service we were unable to receive a successful response until we sent them an Empty SOAPAction header. This was surprising to me as I was under the impression the SOAP specification made the SOAPAction on the request mandatory, until I read on the internet the following:

“I guess nobody has encountered such a problem. I know that if some application claims to be a web service client it should be able to set SOAPAction parameters but, unfortunately, it is not mandatory, just sending it with a null value ("") is enough according to SOAP specifications.

“ The presence and content of the SOAPAction header field can be used by servers such as firewalls to appropriately filter SOAP request messages in HTTP. The header field value of empty string ("") means that the intent of the SOAP message is provided by the HTTP Request-URI. No value means that there is no indication of the intent of the message.”

After doing some tests I noticed that almost all SOAP Web Services (Including our SOAPImporter) will work successfully when supplying an empty SOAPAction header. The operation/action is determined by the SOAP envelope. (Note you must get the Namespace right for both the operation and the parameters which sometimes differ)

Offline

#2 21-11-2018 11:21:06

SeanR
Administrator
Registered: 20-11-2018
Posts: 148

Re: SOAPWebService connector and the SOAPAction explained

HOW DOES THE SOAPWEBSERVICE CONNECTOR DEAL WITH THE SOAPACTION HEADER

If the user does not specifically add a SOAPAction Header using the Custom Headers node in the connector the SOAPWebServices Connector will automatically create a SOAPAction as follows:

  • ---- If the Source attribute in the Create mapping used to send the Request does not contain a / then the value specified in the <Namespace> element in the connector is concatenated with the value specified in the Source attribute of the Create mapping

  • ---- If the Source attribute in the Create mapping used to send the Request does contain a / then the value of the Source attribute itself is used

  • In the case of the client in question where a successful response would only be returned if the SOAPAction was empty you need to specify a Custom header as follows in the connector node:

<sxi:CustomHeaders>
	<sxi:Header name="SOAPAction" value="&amp;quot;&amp;quot;"/>
</sxi:CustomHeaders>

Offline

Board footer

Powered by FluxBB