Package com.ibm.di.connector.axis2
Class Axis2WSServerConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- 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
Fields Modifier and Type Field Description static java.lang.StringATTR_AUTH_RESULTWhether the authentication of the client is successful.static java.lang.StringATTR_FAULT_CODESOAP fault code (the local part of the qualified name).static java.lang.StringATTR_FAULT_CODE_NS_PREFIXSOAP fault code (the namespace prefix).static java.lang.StringATTR_FAULT_CODE_NS_URISOAP fault code (the namespace URI).static java.lang.StringATTR_FAULT_DETAILSOAP fault detail.static java.lang.StringATTR_FAULT_NODESOAP fault node.static java.lang.StringATTR_FAULT_REASONSOAP fault reason.static java.lang.StringATTR_FAULT_ROLESOAP fault role.static java.lang.StringATTR_OPERATION_CARRIERThis Attribute carries the name of the AL Operation.static java.lang.StringATTR_SOAP_HEADERThe SOAP header of the request/response message.static java.lang.StringPARAM_SERVICEThe name of the service description inside the WSDL document.static java.lang.StringPARAM_WSDLA 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
Constructors Constructor Description Axis2WSServerConnector()Creates the Connector.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>getHTTPHeaders(Entry httpEntry)ConnectorInterfacegetNextClient()Server mode - return a clone of self that handles the next client instance when running in server mode.EntrygetNextEntry()Returns the next Entry from the connector.static ResourceHashgetResHash()java.lang.StringgetVersion()Version information.voidinitialize(java.lang.Object obj)Initialize the Connector.booleanisTerminating()java.lang.ObjectquerySchema(java.lang.Object input)This function translates to whatever means a connector has to discover schema for a connection.voidreplyEntry(Entry conn)Send a reply to the connector.voidterminate()Terminate the connector.voidterminateServer()Stop servicing clients.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, 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 java.lang.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 java.lang.String PARAM_SERVICE
The name of the service description inside the WSDL document.- See Also:
- Constant Field Values
-
ATTR_OPERATION_CARRIER
public static final java.lang.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 java.lang.String ATTR_SOAP_HEADER
The SOAP header of the request/response message.- See Also:
- Constant Field Values
-
ATTR_AUTH_RESULT
public static final java.lang.String ATTR_AUTH_RESULT
Whether the authentication of the client is successful.- See Also:
- Constant Field Values
-
ATTR_FAULT_CODE
public static final java.lang.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 java.lang.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 java.lang.String ATTR_FAULT_CODE_NS_PREFIX
SOAP fault code (the namespace prefix).- See Also:
- Constant Field Values
-
ATTR_FAULT_REASON
public static final java.lang.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 java.lang.String ATTR_FAULT_NODE
SOAP fault node.- See Also:
- Constant Field Values
-
ATTR_FAULT_ROLE
public static final java.lang.String ATTR_FAULT_ROLE
SOAP fault role.- See Also:
- Constant Field Values
-
ATTR_FAULT_DETAIL
public static final java.lang.String ATTR_FAULT_DETAIL
SOAP fault detail. This is a Hierarchical Attribute.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object obj) throws java.lang.ExceptionInitialize the Connector.- Specified by:
initializein interfaceConnectorInterface- Overrides:
initializein classConnector- 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:
java.lang.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 java.lang.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:
getNextClientin interfaceConnectorInterface- Overrides:
getNextClientin classConnector- Returns:
- the clone of itself
- Throws:
java.lang.Exception- if an error occurs.
-
terminateServer
public void terminateServer() throws java.lang.ExceptionStop servicing clients.- Specified by:
terminateServerin interfaceConnectorInterface- Overrides:
terminateServerin classConnector- Throws:
java.lang.Exception- if an error occurs.
-
terminate
public void terminate() throws java.lang.ExceptionTerminate 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:
terminatein interfaceConnectorInterface- Overrides:
terminatein classConnector- Throws:
java.lang.Exception- if an error occurs.
-
getNextEntry
public Entry getNextEntry() throws java.lang.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:
getNextEntryin interfaceConnectorInterface- Overrides:
getNextEntryin classConnector- Returns:
- - the next Entry, or null if no more data
- Throws:
java.lang.Exception- if an error occurs.- See Also:
ConnectorInterface.selectEntries()
-
replyEntry
public void replyEntry(Entry conn) throws java.lang.Exception
Send a reply to the connector.- Specified by:
replyEntryin interfaceConnectorInterface- Overrides:
replyEntryin classConnector- Parameters:
conn- the information as an Entry- Throws:
java.lang.Exception- if an error occurs.
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersionin interfaceVersionInfoInterface- Returns:
- version of the Connector.
-
isTerminating
public boolean isTerminating()
- Returns:
- Whether the Connector is terminating.
-
getHTTPHeaders
public static java.util.Map<java.lang.String,java.lang.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 java.lang.Object querySchema(java.lang.Object input) throws java.lang.ExceptionThis 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:
querySchemain interfaceConnectorInterface- Overrides:
querySchemain classConnector- 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:
java.lang.Exception- if an error while retrieving the schema occurs.- See Also:
Entry,Vector
-
-