com.ibm.di.connector.axis2
Class Axis2WSServerConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.axis2.Axis2WSServerConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface

public class Axis2WSServerConnector
extends Connector
implements ConnectorInterface

This Connector can be used to provide a SOAP web service, which is accessible via HTTP/HTTPS. It is named after the underlying Axis2 Java library: http://ws.apache.org/axis2/. The Connector uses the HTTP Server Connector as its HTTP transport.

Since:
TDI 7.0

Field Summary
static String ATTR_AUTH_RESULT
          Whether the authentication of the client is successful.
static String ATTR_FAULT_CODE
          SOAP fault code (the local part of the qualified name).
static String ATTR_FAULT_CODE_NS_PREFIX
          SOAP fault code (the namespace prefix).
static String ATTR_FAULT_CODE_NS_URI
          SOAP fault code (the namespace URI).
static String ATTR_FAULT_DETAIL
          SOAP fault detail.
static String ATTR_FAULT_NODE
          SOAP fault node.
static String ATTR_FAULT_REASON
          SOAP fault reason.
static String ATTR_FAULT_ROLE
          SOAP fault role.
static String ATTR_OPERATION_CARRIER
          This Attribute carries the name of the AL Operation.
static String ATTR_SOAP_HEADER
          The SOAP header of the request/response message.
static String PARAM_SERVICE
          The name of the service description inside the WSDL document.
static String PARAM_WSDL
          A URL of a WSDL document.
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
Axis2WSServerConnector()
          Creates the Connector.
 
Method Summary
static Map<String,String> getHTTPHeaders(Entry httpEntry)
           
 ConnectorInterface getNextClient()
          Server mode - return a clone of self that handles the next client instance when running in server mode.
 Entry getNextEntry()
          Returns the next Entry from the connector.
static ResourceHash getResHash()
           
 String getVersion()
          Version information.
 void initialize(Object obj)
          Initialize the Connector.
 boolean isTerminating()
           
 Object querySchema(Object input)
          This function translates to whatever means a connector has to discover schema for a connection.
 void replyEntry(Entry conn)
          Send a reply to the connector.
 void terminate()
          Terminate the connector.
 void terminateServer()
          Stop servicing clients.
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, queryTables, reconnect, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface
 

Field Detail

PARAM_WSDL

public static final String PARAM_WSDL
A URL of a WSDL document. Both WSDL 1.1 and WSDL 2.0 documents are allowed.

See Also:
Constant Field Values

PARAM_SERVICE

public static final String PARAM_SERVICE
The name of the service description inside the WSDL document.

See Also:
Constant Field Values

ATTR_OPERATION_CARRIER

public static final String ATTR_OPERATION_CARRIER
This Attribute carries the name of the AL Operation. The static configuration of this Connector (tdi.xml) declares this Attribute as the Operation Carrier.

See Also:
Constant Field Values

ATTR_SOAP_HEADER

public static final String ATTR_SOAP_HEADER
The SOAP header of the request/response message.

See Also:
Constant Field Values

ATTR_AUTH_RESULT

public static final String ATTR_AUTH_RESULT
Whether the authentication of the client is successful.

See Also:
Constant Field Values

ATTR_FAULT_CODE

public static final String ATTR_FAULT_CODE
SOAP fault code (the local part of the qualified name). If specified, the Connector will send a SOAP fault response to the client.

See Also:
Constant Field Values

ATTR_FAULT_CODE_NS_URI

public static final String ATTR_FAULT_CODE_NS_URI
SOAP fault code (the namespace URI).

See Also:
Constant Field Values

ATTR_FAULT_CODE_NS_PREFIX

public static final String ATTR_FAULT_CODE_NS_PREFIX
SOAP fault code (the namespace prefix).

See Also:
Constant Field Values

ATTR_FAULT_REASON

public static final String ATTR_FAULT_REASON
SOAP fault reason. If you specify SOAP fault code, you must specify this one too.

See Also:
Constant Field Values

ATTR_FAULT_NODE

public static final String ATTR_FAULT_NODE
SOAP fault node.

See Also:
Constant Field Values

ATTR_FAULT_ROLE

public static final String ATTR_FAULT_ROLE
SOAP fault role.

See Also:
Constant Field Values

ATTR_FAULT_DETAIL

public static final String ATTR_FAULT_DETAIL
SOAP fault detail. This is a Hierarchical Attribute.

See Also:
Constant Field Values
Constructor Detail

Axis2WSServerConnector

public Axis2WSServerConnector()
Creates the Connector.

Method Detail

initialize

public void initialize(Object obj)
                throws Exception
Initialize the Connector.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
obj - Pass an instance of the HTTPServerConnector, which handles a particular client to initialize the Connector for a client session. Otherwise the Connector will start an HTTP server and will wait for clients.
Throws:
Exception - If the 'service' parameter is not specified and the WSDL document contains multiple service descriptions. If the 'service' parameter is specified, but does not refer to an existing service description from the WSDL document. A problem while reading the WSDL document or an Axis2 related error.

getNextClient

public ConnectorInterface getNextClient()
                                 throws Exception
Server mode - return a clone of self that handles the next client instance when running in server mode. The returned connector may be used in its own thread to handle a "client" request so if the returned instance is returned more than once it must be thread safe.

Specified by:
getNextClient in interface ConnectorInterface
Overrides:
getNextClient in class Connector
Returns:
the clone of itself
Throws:
Exception - if an error occurs.

terminateServer

public void terminateServer()
                     throws Exception
Stop servicing clients.

Specified by:
terminateServer in interface ConnectorInterface
Overrides:
terminateServer in class Connector
Throws:
Exception - if an error occurs.

terminate

public void terminate()
               throws Exception
Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector
Throws:
Exception - if an error occurs.

getNextEntry

public Entry getNextEntry()
                   throws Exception
Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.

Example:

 var ctor = input.getConnector();
 var entry = ctor.getNextEntry();
 
 for (; entry != null; entry = ctor.getNextEntry()) {
        main.logmsg("Read entry...");
        main.dumpEntry(entry);
 }
 

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
- the next Entry, or null if no more data
Throws:
Exception - if an error occurs.
See Also:
ConnectorInterface.selectEntries()

replyEntry

public void replyEntry(Entry conn)
                throws Exception
Send a reply to the connector.

Specified by:
replyEntry in interface ConnectorInterface
Overrides:
replyEntry in class Connector
Parameters:
conn - the information as an Entry
Throws:
Exception - if an error occurs.

getVersion

public String getVersion()
Version information.

Specified by:
getVersion in interface VersionInfoInterface
Returns:
version of the Connector.

isTerminating

public boolean isTerminating()
Returns:
Whether the Connector is terminating.

getHTTPHeaders

public static Map<String,String> getHTTPHeaders(Entry httpEntry)
Parameters:
httpEntry - An Entry produced by the HTTP Server Connector.
Returns:
The HTTP headers from the Entry.

getResHash

public static ResourceHash getResHash()
Returns:
The container with Connector's messages.

querySchema

public Object querySchema(Object input)
                   throws Exception
This function translates to whatever means a connector has to discover schema for a connection. The connector may implement this, in which case a Vector of Entry objects is returned for each column/attribute it discovered. For a database connector this would typically be column names and their attributes.

Each Entry in the Vector returned should contain the following attributes:

Name Value
name The name of the column/attribute/field ....
syntax The syntax or expected value type
size If specified this will give the user a hint as to how long the field may be

Specified by:
querySchema in interface ConnectorInterface
Overrides:
querySchema in class Connector
Parameters:
input - The object on which to discover schema. This may be an Entry or a string value
Returns:
A Vector of com.ibm.di.entry.Entry objects describing each entity
Throws:
Exception - if an error while retrieving the schema occurs.
See Also:
Entry, Vector