SOAP header not set
lostvicking Sep 27, 2013 2:39 AMHi everybody,
I've come across an issue where the SOAPAction header is not getting set in my outgoing SOAP messages from a Switchyard project (version 1.0.0.Final created using the tooling provided). When using soapui to generate the message (using the WSDL) the SOAPAction is header is set correctly. The Switchyard project uses JAX-WS generated code (generated from the same WSDL as soapui messages) which has the annotations in place for setting the SOAPAction header, however it seems these are being ignored.
Below is an excerpt from the JAX-WS generated code for the web service:
@WebService(name = "wsBICISOPortType", targetNamespace = "http://tempuri.org/wsBICISO/definitions")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@XmlSeeAlso({
ObjectFactory.class
})
public interface WsBICISOPortType {
/**
*
* @param pos200
* @return
* returns za.co.fnb.base24.POS210Type
*/
@WebMethod(action = "op0200")
@WebResult(name = "POS_210", targetNamespace = "http://tempuri.org/wsBICISO/schemas", partName = "POS_210")
public POS210Type op0200(
@WebParam(name = "POS_200", targetNamespace = "http://tempuri.org/wsBICISO/schemas", partName = "POS_200")
POS200Type pos200);
}
Here is an excerpt from the valid soapui message with SOAPAction header set:
POST /soap HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "op0200"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 172.18.191.200:31340
Content-Length: 5212
Here is a piece of the SOAP message sent out by the Switchyard project:
POST /soap HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
SOAPAction: ""
User-Agent: Apache CXF 2.6.6-redhat-3
Cache-Control: no-cache
Pragma: no-cache
Host: 172.18.191.200:31340
Connection: keep-alive
Content-Length: 3855
If anyone can suggest a way of getting the SOAPAction header set properly I would greatly appreciate it. I do have transformers declared in the switchyard.xml and I am not sure if this is the cause of the header not getting set, the transformers look like this:
<transforms xmlns:transform="urn:switchyard-config:transform:1.0">
<transform:transform.jaxb from="java:za.co.fnb.base24.POS200Type" to="{http://tempuri.org/wsBICISO/schemas}POS_200"/>
<transform:transform.jaxb from="{http://tempuri.org/wsBICISO/schemas}POS_210" to="java:za.co.fnb.base24.POS210Type"/>
<transform:transform.jaxb from="java:za.co.fnb.base24.POS220Type" to="{http://tempuri.org/wsBICISO/schemas}POS_220"/>
<transform:transform.jaxb from="{http://tempuri.org/wsBICISO/schemas}POS_220" to="java:za.co.fnb.base24.POS220Type"/>
<transform:transform.jaxb from="java:za.co.fnb.base24.POS420Type" to="{http://tempuri.org/wsBICISO/schemas}POS_420"/>
<transform:transform.jaxb from="{http://tempuri.org/wsBICISO/schemas}POS_420" to="java:za.co.fnb.base24.POS420Type"/>
</transforms>
Regards
Victor