Using HTTPRouter to send a SOAP 1.1 request fails
sanjayvarma.b Dec 19, 2013 12:17 PMI am unable to make the HTTPRouter configuration work with SOAP1.1 requests. I guess the only difference between sending a SOAP1.1 and SOAP1.2 request is the Content-Type parameter value. If I use the following configuration using Content-Type "application/SOAP+xml", then I am able to see a valid SOAP 1.2 request and response from a web service.
However I can't make this to work for Content-Type value ="text/xml" as shown below.
Can anyone tell me why this fails?
Here is my jboss-esb.xml and smooks action. The input to my smooks action is a java object in the message from which I use SAX and free marker to do the templating.
Jboss-esb.xml
<action class="org.jboss.soa.esb.smooks.SmooksAction" name="create-details-query">
<property name="smooksConfig" value="/smooks/smooks-query.xml"/>
<property name="resultType" value="STRING" />
</action>
<action class="org.jboss.soa.esb.actions.routing.http.HttpRouter" name="query-right-now">
<property name="Content-Type" value="text/xml"/>
<property name="method" value="POST"/>
<property name="endpointUrl" value="${org.test.endpoint}">
<http-client-property name="keystore" value="${javax.net.ssl.trustStore}"/>
<http-client-property name="keystore-passw" value="${javax.net.ssl.trustStorePassword}"/>
</property>
</action>
smooks-query.xml
<?xml version="1.0" encoding='UTF-8'?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd">
<params>
<param name="stream.filter.type">SAX</param>
<param name="default.serialization.on">false</param>
</params>
<resource-config selector="entry,simpleReport">
<resource>org.milyn.delivery.DomModelCreator</resource>
</resource-config>
<ftl:freemarker applyOnElement="com.wcustom.ws.messages.v1__2.RunReport">
<ftl:template><!--<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<v1:Delimiter>${entry["com.wcustom.ws.messages.v1__2.RunReport"].delimiter}</v1:Delimiter>
<v1:ReturnRawResult>${entry["com.wcustom.ws.messages.v1__2.RunReport"].returnRawResult}</v1:ReturnRawResult>
</soapenv:Body>
</soapenv:Envelope>--></ftl:template>
</ftl:freemarker>
</smooks-resource-list>