Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.soa.esb.actions.soap
Class SOAPProcessor

    java.lang.Object
      org.jboss.soa.esb.actions.AbstractActionLifecycle
          org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
              org.jboss.soa.esb.actions.soap.SOAPProcessor

All Implemented Interfaces:
  ActionLifecycle, ActionPipelineProcessor

    @Publish(value=WebserviceContractPublisher.class)
    public class SOAPProcessor

extends AbstractActionPipelineProcessor

JBoss Webservices SOAP Processor.

This action supports invocation of a JBossWS hosted webservice endpoint through any JBossESB hosted listener. This means the ESB can be used to expose Webservice endpoints for Services that don't already expose a Webservice endpoint. You can do this by writing a thin Service Wrapper Webservice (e.g. a JSR 181 implementation) that wraps calls to the target Service (that doesn't have a Webservice endpoint), exposing that Service via endpoints (listeners) running on the ESB. This also means that these Services are invocable over any transport channel supported by the ESB (http, ftp, jms etc).

### "ESB Message Aware" Webservice Endpoints

Note that Webservice endpoints exposed via this action have direct access to the current JBossESB `Message` instance used to invoke this action's `process(org.jboss.soa.esb.message.Message)` method. It can access the current `Message` instance via the `getMessage()` method and can change the `Message` instance via the `setMessage(org.jboss.soa.esb.message.Message)` method. This means that Webservice endpoints exposed via this action are "ESB Message Aware".

### Webservice Endpoint Deployment

Any JBossWS Webservice endpoint can be exposed via ESB listeners using this action. That includes endpoints that are deployed from inside (i.e. the Webservice .war is bundled inside the .esb) and outside (e.g. standalone Webservice .war deployments, Webservice .war deployments bundled inside a .ear) a .esb deployment.

#### JAXB Introductions

The native JBossWS SOAP stack uses JAXB to bind to and from SOAP. This typically means that an unannotated typeset could not be used to build a JSR 181 endpoint on JBossWS. To overcome this we use a JBossESB and JBossWS feature called "JAXB Introductions" which basically means you can define an XML configuration to "Introduce" the JAXB Annotations. For more on this, see the section on this action in the Message Action Guide.

### Action Configuration

The <action ... /> configuration for this action is very straightforward. The action requires only one mandatory property value, which is the "jbossws-endpoint" property. This property names the JBossWS endpoint that the SOAPProcessor is exposing (invoking).

     <action name="ShippingProcessor" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
         <property name="jbossws-endpoint" value="ABI_Shipping"/>
         <property name="rewrite-endpoint-url" value="true/false"/> <-- Optional. Default "true". -->
     </action>

The optional "rewrite-endpoint-url" property is there to support load balancing on HTTP endpoints, in which case the Webservice endpoint container will have been configured to set the HTTP(S) endpoint address in the WSDL to that of the Load Balancer. The "rewrite-endpoint-url" property can be used to turn off HTTP endpoint address rewriting in situations such as this. It has no effect for non-HTTP protocols.

### Quickstarts

A number of quickstarts that demonstrate how to use this action are available in the JBossESB distribution (samples/quickstarts). See the "webservice_jbossws_adapter_01" and "webservice_bpel" quickstarts.

Author:
  tom.fennelly@jboss.com

Field Summary
`static java.lang.String` | `JBOSSWS_ENDPOINT`
`static java.lang.String` | `REWRITE_ENDPOINT_URL`

Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor
`PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD`

Constructor Summary
`SOAPProcessor(ConfigTree config)` Public constructor.

Method Summary
`static Message` | `getMessage()` Get the `Message` instance for this invocation context.
`protected static org.jboss.wsf.spi.deployment.Endpoint` | `getServiceEndpoint(java.lang.String endpointName)` Get the Service Endpoint based on the endpoint name.
`Message` | `process(Message message)` Process the SOAP message.
`static void` | `setMessage(Message message)` Set the `Message` instance for this invocation context.

Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
`processException, processSuccess`

Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle
`destroy, initialise`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jboss.soa.esb.actions.ActionLifecycle
`destroy, initialise`

Field Detail

### JBOSSWS_ENDPOINT

    public static final java.lang.String JBOSSWS_ENDPOINT

See Also:
  Constant Field Values

### REWRITE_ENDPOINT_URL

    public static final java.lang.String REWRITE_ENDPOINT_URL

See Also:
  Constant Field Values

Constructor Detail

### SOAPProcessor

    public SOAPProcessor(ConfigTree config)
                  throws ConfigurationException

  Public constructor.

  Parameters:
    `config` - Configuration.
  Throws:
    `ConfigurationException` - "jbossws-endpoint" not specified.

Method Detail

### process

    public Message process(Message message)
                    throws ActionProcessingException

  Process the SOAP message.

  Invokes the JBossWS endpoint and writes the SOAP response back into the message payload.

  Parameters:
    `message` - The ESB Aware (normalized) SOAP request message.
  Returns:
    The SOAP response message.
  Throws:
    `ActionProcessingException`

### setMessage

    public static void setMessage(Message message)

  Set the `Message` instance for this invocation context.

  This allows message aware Webservice endpoints modify the `Message` instance for the current Action Processing Pipeline.

  Parameters:
    `message` - The new message instance.

### getMessage

    public static Message getMessage()

  Get the `Message` instance for this invocation context.

  Returns:
    The message instance.

### getServiceEndpoint

    protected static org.jboss.wsf.spi.deployment.Endpoint getServiceEndpoint(java.lang.String endpointName)

  Get the Service Endpoint based on the endpoint name.

  Parameters:
    `endpointName` - Service Endpoint name.
  Returns:
    The service endpoint, or null if the endpoint is not found.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD