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

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

public abstract class AbstractExternalServiceCaller
extends java.lang.Object

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 abstract  void call(org.ow2.petals.component.framework.api.message.Exchange exchange, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions, org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
          Process the message exchange (call an external WS).
protected abstract  java.lang.String getCallerType()
          Returns the type of dispatcher.
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 static void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange, java.lang.Exception t)
          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 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 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
 

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

retrieveChunkedMode

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

Parameters:
extensions -
Returns:

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

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

call

protected abstract void call(org.ow2.petals.component.framework.api.message.Exchange exchange,
                             org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions,
                             org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
Process the message exchange (call an external WS).

Parameters:
exchange -
extensions -

getCallerType

protected abstract java.lang.String getCallerType()
Returns the type of dispatcher.

Returns:

handleException

protected final 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 final void handleException(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                     java.lang.String errorMessage)
Parameters:
exchange -
e -

handleException

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

Parameters:
exchange -
exception - The exception


Copyright © 2005-2012 Petals Link (EBM Websourcing). All Rights Reserved.