com.ibm.di.connector.WSReceiverServerConnector
Class WSReceiverServerConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.WSReceiverServerConnector.WSReceiverServerConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface
Direct Known Subclasses:
AxisEasyWSServerConnector

public class WSReceiverServerConnector
extends Connector
implements ConnectorInterface


Field Summary
static String ATTR_HOST
           
static String ATTR_REQUESTED_RESOURCE
           
static String ATTR_RESPONSE_CONTENT_TYPE
           
static String ATTR_SOAP_ACTION
           
static String ATTR_SOAP_REQUEST
           
static String ATTR_SOAP_RESPONSE
           
static String ATTR_WSDL_REQUESTED
           
protected  String CHARSET
           
static String CONTENT_TYPE_HTML
           
static String CONTENT_TYPE_XML
           
protected static String FALSE
           
protected  String mInputXMLType
           
protected  boolean mNoNextEntry
           
protected  int mPort
           
protected  boolean mRequireClientAuth
           
protected  String mReturnXMLType
           
protected  SAXParserFactory mSAXParserFactory
           
protected  WSReceiverServerConnector mServerConnector
           
protected  ServerSocket mServerSocket
           
protected  Socket mSocket
           
protected  boolean mTagOpEntry
           
protected  boolean mUseSSL
           
protected static String PARAM_INPUT_TYPE
           
protected static String PARAM_REQUIRE_CLIENT_AUTH
           
protected static String PARAM_RETURN_XML_TYPE
           
protected static String PARAM_SYSTEM_TCP_BACKLOG
           
protected static String PARAM_TAG_OPENTRY
           
protected static String PARAM_TCP_BACKLOG
           
protected static String PARAM_TCP_PORT
           
protected static String PARAM_USE_SSL
           
protected static String TRUE
           
static String WSDL_ID
           
static String XML_DOM
           
static String XML_STRING
           
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
WSReceiverServerConnector()
           
 
Method Summary
protected  String getAuthorization(StringBuffer headers)
          Gets the username and password return by client.
protected  StringBuffer getHeaders()
          Gets the header information send by client.
 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.
 WSReceiverServerConnector getServerConnector()
           
 String getVersion()
           
protected  void httpAuthenticationRequest(String realm)
          Send request to client to authenticate.
 void initialize(Object obj)
          Initialize the connector.
 boolean isAccepting()
           
 boolean isTerminating()
           
 String readFile(String aFileName)
           
protected  String readLine()
          Read line from client.
 void replyEntry(Entry conn)
          Send a reply to the connector.
 void setServerConnector(WSReceiverServerConnector aServerConnector)
           
 void terminate()
          Terminate the connector.
 void terminateServer()
          Default implementation - does nothing.
 
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, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, 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, querySchema, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface
 

Field Detail

PARAM_TCP_PORT

protected static final String PARAM_TCP_PORT
See Also:
Constant Field Values

PARAM_TCP_BACKLOG

protected static final String PARAM_TCP_BACKLOG
See Also:
Constant Field Values

PARAM_SYSTEM_TCP_BACKLOG

protected static final String PARAM_SYSTEM_TCP_BACKLOG
See Also:
Constant Field Values

PARAM_RETURN_XML_TYPE

protected static final String PARAM_RETURN_XML_TYPE
See Also:
Constant Field Values

PARAM_INPUT_TYPE

protected static final String PARAM_INPUT_TYPE
See Also:
Constant Field Values

PARAM_USE_SSL

protected static final String PARAM_USE_SSL
See Also:
Constant Field Values

PARAM_REQUIRE_CLIENT_AUTH

protected static final String PARAM_REQUIRE_CLIENT_AUTH
See Also:
Constant Field Values

PARAM_TAG_OPENTRY

protected static final String PARAM_TAG_OPENTRY
See Also:
Constant Field Values

mPort

protected int mPort

mInputXMLType

protected String mInputXMLType

mReturnXMLType

protected String mReturnXMLType

mUseSSL

protected boolean mUseSSL

mRequireClientAuth

protected boolean mRequireClientAuth

mTagOpEntry

protected boolean mTagOpEntry

mSocket

protected Socket mSocket

mServerSocket

protected ServerSocket mServerSocket

mServerConnector

protected WSReceiverServerConnector mServerConnector

CHARSET

protected String CHARSET

ATTR_SOAP_RESPONSE

public static final String ATTR_SOAP_RESPONSE
See Also:
Constant Field Values

ATTR_HOST

public static final String ATTR_HOST
See Also:
Constant Field Values

ATTR_REQUESTED_RESOURCE

public static final String ATTR_REQUESTED_RESOURCE
See Also:
Constant Field Values

ATTR_SOAP_REQUEST

public static final String ATTR_SOAP_REQUEST
See Also:
Constant Field Values

ATTR_SOAP_ACTION

public static final String ATTR_SOAP_ACTION
See Also:
Constant Field Values

ATTR_WSDL_REQUESTED

public static final String ATTR_WSDL_REQUESTED
See Also:
Constant Field Values

ATTR_RESPONSE_CONTENT_TYPE

public static final String ATTR_RESPONSE_CONTENT_TYPE
See Also:
Constant Field Values

XML_STRING

public static final String XML_STRING
See Also:
Constant Field Values

XML_DOM

public static final String XML_DOM
See Also:
Constant Field Values

WSDL_ID

public static final String WSDL_ID
See Also:
Constant Field Values

CONTENT_TYPE_XML

public static final String CONTENT_TYPE_XML
See Also:
Constant Field Values

CONTENT_TYPE_HTML

public static final String CONTENT_TYPE_HTML
See Also:
Constant Field Values

TRUE

protected static final String TRUE
See Also:
Constant Field Values

FALSE

protected static final String FALSE
See Also:
Constant Field Values

mNoNextEntry

protected boolean mNoNextEntry

mSAXParserFactory

protected SAXParserFactory mSAXParserFactory
Constructor Detail

WSReceiverServerConnector

public WSReceiverServerConnector()
Method Detail

initialize

public void initialize(Object obj)
                throws Exception
Description copied from class: Connector
Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
obj - User provided parameter
Throws:
Exception

getNextClient

public ConnectorInterface getNextClient()
                                 throws Exception
Description copied from class: Connector
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
Throws:
Exception

getServerConnector

public WSReceiverServerConnector getServerConnector()

setServerConnector

public void setServerConnector(WSReceiverServerConnector aServerConnector)

terminateServer

public void terminateServer()
                     throws Exception
Description copied from class: Connector
Default implementation - does nothing.

Specified by:
terminateServer in interface ConnectorInterface
Overrides:
terminateServer in class Connector
Throws:
Exception

terminate

public void terminate()
               throws Exception
Description copied from class: Connector
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

getNextEntry

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

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

replyEntry

public void replyEntry(Entry conn)
                throws Exception
Description copied from class: Connector
Send a reply to the connector.

Specified by:
replyEntry in interface ConnectorInterface
Overrides:
replyEntry in class Connector
Throws:
Exception

isAccepting

public boolean isAccepting()

isTerminating

public boolean isTerminating()

getVersion

public String getVersion()
Specified by:
getVersion in interface VersionInfoInterface

readFile

public String readFile(String aFileName)
                throws IOException
Throws:
IOException

getAuthorization

protected String getAuthorization(StringBuffer headers)
                           throws IOException
Gets the username and password return by client.

Parameters:
headers - HTTP headers sent by client.
Returns:
Pair - username and password, separated by colon.
Throws:
IOException

getHeaders

protected StringBuffer getHeaders()
                           throws IOException
Gets the header information send by client.

Returns:
Header information.
Throws:
IOException

readLine

protected String readLine()
                   throws IOException
Read line from client. This method is used when HTTP Basic Authentication is enabled.

Returns:
Returns the line read.
Throws:
IOException

httpAuthenticationRequest

protected void httpAuthenticationRequest(String realm)
                                  throws IOException
Send request to client to authenticate.

Throws:
IOException