Version 1

    This is an action that can be used for performing WS requests.

    It is based on the JAX-WS Dispatch interface for calling a WS without any generated stub classes where you can work directly on the XML message data.

    The advantage with this class is that it operates directly on the XML message that you typically have in your ESB message. With this action there is no need to format the request data paramters in an OGNL encoded map like you have to do with the SOAPClient action.

    Problems:
    I've seen some problems with the request timeout with old jboss WS releases.
    You may want to clean up the hard coded SOAP element strings.

     

    Here is a usage example of what you might use in jboss-esb.xml:

     

    <action name="call-ws"
                 class="se.sj.ipl.esb.actions.soap.WSDispatchClientAction">
                  <property name="serviceName" value="SomeServiceName" />
                  <property name="portName" value="SomePortName" />
                  <property name="soapAction" value="http://some.hos/SomeActionIfExplicitlyRequired" />
                  <property name="targetNS" value="http://some.host/namespace/of/service" />
                  <property name="endpointAddress" value="http://some.host/someTargetWS" />
                  <property name="requestHeaderDataLocation" value="some.location.where.header.data.is.located" />
                  <property name="timeout" value="60000" />
    </action>


    Usage of this code:
    JBoss: Please feel free to incorporate this into the ESB if you like it.
    Others: Copy-paste as you see fit.

    Code initially posted at:

    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199202