org.ow2.petals.binding.soap.listener.outgoing
Class SOAPCaller

java.lang.Object
  extended by org.ow2.petals.binding.soap.listener.outgoing.AbstractExternalServiceCaller
      extended by org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller
All Implemented Interfaces:
ExternalServiceCaller

public class SOAPCaller
extends AbstractExternalServiceCaller

An external web service dispatcher. This dispatcher send the JBI message to an external web service. The service URL is specified in the PEtALS extensions.

Author:
chamerling - eBM WebSourcing

Field Summary
 
Fields inherited from class org.ow2.petals.binding.soap.listener.outgoing.AbstractExternalServiceCaller
logger, SOAP_VERSION_11, SOAP_VERSION_12, soapContext
 
Constructor Summary
SOAPCaller(SoapComponentContext soapContext, java.util.logging.Logger logger)
          Creates a new instance of SOAPCaller
 
Method Summary
protected static org.apache.axiom.om.OMElement buildOMElementFromSource(javax.xml.transform.Source body, javax.xml.namespace.QName operation, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions, org.apache.axiom.om.OMFactory factory)
          Build the OMElement from the Source.
protected  org.apache.axiom.om.OMElement buildResponseElement(org.apache.axiom.soap.SOAPBody body)
           
 void call(org.ow2.petals.component.framework.api.message.Exchange exchange, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions cdkExtensions, org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
          Process the message exchange (call an external WS).
protected static org.apache.axiom.om.OMElement createSOAPBodyContent(javax.jbi.messaging.NormalizedMessage nm, javax.xml.namespace.QName operation, ServiceClient client, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Create the SOAPBody content.
 java.lang.String getCallerType()
          Returns the type of dispatcher.
protected  boolean isFilteredValue(java.lang.String propertyName, java.util.List<java.lang.String> filters)
           
protected  void updateClient(ServiceClient client, Addressing addressing, org.ow2.petals.component.framework.api.message.Exchange exchange)
          Update the client properties
 
Methods inherited from class org.ow2.petals.binding.soap.listener.outgoing.AbstractExternalServiceCaller
handleException, handleException, handleException, retrieveAddressing, retrieveAddRoot, retrieveBasicAuthentication, retrieveChunkedMode, retrieveCleanupTransport, retrieveDefaultSOAPAction, retrieveProxySettings, retrieveServiceAddress, retrieveSOAPEnvelopeNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPCaller

public SOAPCaller(SoapComponentContext soapContext,
                  java.util.logging.Logger logger)
Creates a new instance of SOAPCaller

Parameters:
soapContext -
logger -
Method Detail

call

public void call(org.ow2.petals.component.framework.api.message.Exchange exchange,
                 org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions cdkExtensions,
                 org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
Description copied from interface: ExternalServiceCaller
Process the message exchange (call an external WS).


updateClient

protected void updateClient(ServiceClient client,
                            Addressing addressing,
                            org.ow2.petals.component.framework.api.message.Exchange exchange)
Update the client properties

Parameters:
client -
addressing -

isFilteredValue

protected boolean isFilteredValue(java.lang.String propertyName,
                                  java.util.List<java.lang.String> filters)
Parameters:
propertyName -
filters -
Returns:

buildResponseElement

protected org.apache.axiom.om.OMElement buildResponseElement(org.apache.axiom.soap.SOAPBody body)
Parameters:
body -
Returns:

createSOAPBodyContent

protected static org.apache.axiom.om.OMElement createSOAPBodyContent(javax.jbi.messaging.NormalizedMessage nm,
                                                                     javax.xml.namespace.QName operation,
                                                                     ServiceClient client,
                                                                     org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
                                                              throws javax.xml.stream.XMLStreamException
Create the SOAPBody content. The JBI content is used as root element. All the JBI attachments are added as root element children.

Parameters:
body -
Returns:
the soap body content or null if NormalizedMessage is empty.
Throws:
javax.xml.stream.XMLStreamException

buildOMElementFromSource

protected static org.apache.axiom.om.OMElement buildOMElementFromSource(javax.xml.transform.Source body,
                                                                        javax.xml.namespace.QName operation,
                                                                        org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions,
                                                                        org.apache.axiom.om.OMFactory factory)
                                                                 throws javax.xml.stream.XMLStreamException
Build the OMElement from the Source. The SOAP operation is added as root element if it is configured in the petals extensions.

Parameters:
body -
operation -
extensions -
Returns:
Throws:
javax.xml.stream.XMLStreamException

getCallerType

public java.lang.String getCallerType()
Description copied from interface: ExternalServiceCaller
Returns the type of dispatcher.

Returns:


Copyright © 2005-2010 OW2 Consortium. All Rights Reserved.