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

java.lang.Object
  extended by org.ow2.petals.binding.soap.listener.outgoing.AbstractExternalServiceCaller
All Implemented Interfaces:
ExternalServiceCaller
Direct Known Subclasses:
RESTCaller, SOAPCaller, WSNotifier

public abstract class AbstractExternalServiceCaller
extends java.lang.Object
implements ExternalServiceCaller

Abstract class for dispatchers. Dispatchers are used to send JBI message to external Web Services.

Author:
chamerling - eBM WebSourcing

Field Summary
protected  java.util.logging.Logger logger
          The logger
static java.lang.String SOAP_VERSION_11
           
static java.lang.String SOAP_VERSION_12
           
protected  SoapComponentContext soapContext
          The soap component context
 
Constructor Summary
AbstractExternalServiceCaller(SoapComponentContext soapContext, java.util.logging.Logger logger)
          Creates a new instance of AbstractExternalServiceCaller
 
Method Summary
protected  void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange, org.apache.axis2.AxisFault axisFault)
          Set the Exception in the JBI Message as Error.
protected  void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange, java.lang.Exception exception)
          Set the Exception in the JBI Message as Error.
protected  void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange, java.lang.String errorMessage)
           
protected static Addressing retrieveAddressing(org.ow2.petals.component.framework.api.message.Exchange exchange, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the addressing information from the exchange and from the service unit extensions.
protected static boolean retrieveAddRoot(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
protected static org.apache.axis2.transport.http.HttpTransportProperties.Authenticator retrieveBasicAuthentication(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions, org.apache.axis2.client.Options options)
          Getting the basic authentication parameters for the outgoing SOAP request.
protected static java.lang.String retrieveChunkedMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the chunked mode
protected static boolean retrieveCleanupTransport(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the cleanup-transport property value (true/false).
protected static java.lang.String retrieveDefaultSOAPAction(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the default SOAP action from the extensions.
protected static org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties retrieveProxySettings(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the proxy settings from the extensions.
protected static java.lang.String retrieveServiceAddress(org.ow2.petals.component.framework.api.message.Exchange exchange, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the final service address for this endpoint and message exchange.
protected static java.lang.String retrieveSOAPEnvelopeNamespaceURI(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve, in the jbi.xml descriptor, the SOAP version to use for SoapEnvelopeNamespaceURI Search a soap-version tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.petals.binding.soap.listener.outgoing.ExternalServiceCaller
call, getCallerType
 

Field Detail

SOAP_VERSION_11

public static final java.lang.String SOAP_VERSION_11
See Also:
Constant Field Values

SOAP_VERSION_12

public static final java.lang.String SOAP_VERSION_12
See Also:
Constant Field Values

soapContext

protected SoapComponentContext soapContext
The soap component context


logger

protected java.util.logging.Logger logger
The logger

Constructor Detail

AbstractExternalServiceCaller

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

Parameters:
soapContext -
logger -
Method Detail

handleException

protected void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange,
                               java.lang.Exception exception)
Set the Exception in the JBI Message as Error.

Parameters:
exchange -
exception - The exception

handleException

protected void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange,
                               org.apache.axis2.AxisFault axisFault)
Set the Exception in the JBI Message as Error. Search the great informations to summarize the situation into the causes of the AxisFault

Parameters:
exchange -
axisFault - The axisFault

handleException

protected void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange,
                               java.lang.String errorMessage)
Parameters:
exchange -
e -

retrieveAddRoot

protected static final boolean retrieveAddRoot(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
extensions -
Returns:

retrieveDefaultSOAPAction

protected static final java.lang.String retrieveDefaultSOAPAction(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the default SOAP action from the extensions.

Parameters:
extensions -
Returns:

retrieveProxySettings

protected static final org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties retrieveProxySettings(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the proxy settings from the extensions. The proxy-host value is required. The other ones will be set to default values by Axis if they have not been setted by the SU.

Parameters:
extensions - must be not null. Contains proxy-* optional tags.
Returns:
the proxy settings if they are present in the extensions, null otherwise.
See Also:
HttpTransportProperties.ProxyProperties

retrieveSOAPEnvelopeNamespaceURI

protected static final java.lang.String retrieveSOAPEnvelopeNamespaceURI(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve, in the jbi.xml descriptor, the SOAP version to use for SoapEnvelopeNamespaceURI Search a soap-version tag.
Legal values are 1.1 and 1.2. 1.1 is used if no tag is found.

Parameters:
extensions - must be non null. Contains a soap-version optional tag.
Returns:
the Axis2 soapEnvelopeNamespaceURI constant.
See Also:
org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI

retrieveCleanupTransport

protected static final boolean retrieveCleanupTransport(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the cleanup-transport property value (true/false).

Parameters:
extensions -
Returns:
See Also:
#308219

retrieveChunkedMode

protected static final java.lang.String retrieveChunkedMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the chunked mode

Parameters:
extensions -
Returns:

retrieveBasicAuthentication

protected static final org.apache.axis2.transport.http.HttpTransportProperties.Authenticator retrieveBasicAuthentication(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions,
                                                                                                                         org.apache.axis2.client.Options options)
Getting the basic authentication parameters for the outgoing SOAP request.

Parameters:
extensions -
options -
Returns:

retrieveServiceAddress

protected static final java.lang.String retrieveServiceAddress(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                                               org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the final service address for this endpoint and message exchange. This service address is defined like this :
  1. If it exists, get the address from the exchange org.ow2.petals.component.framework.api.Constants.WSStar.ADDRESSING_KEY property (OASIS/W3C standard)
  2. Else, if it exists, get the address from the exchange WSA-TO property if found (Microsoft/IBM standard)
  3. Else, get the address from the Service unit

Parameters:
exchange - The exchange
extensions - The extensions
Returns:
the address

retrieveAddressing

protected static final Addressing retrieveAddressing(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                                     org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the addressing information from the exchange and from the service unit extensions.

Parameters:
exchange -
extensions -
Returns:


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