Class WSReceiverServerConnector

    • Field Detail

      • PARAM_TCP_PORT

        protected static final java.lang.String PARAM_TCP_PORT
        Parameter name.The port number the service is running (listening) on
        See Also:
        Constant Field Values
      • PARAM_TCP_BACKLOG

        protected static final java.lang.String PARAM_TCP_BACKLOG
        Parameter name.Backlog. The maximum queue length for incoming connections. If a connection request arrives when the queue is full, the connection will be refused.
        See Also:
        Constant Field Values
      • PARAM_SYSTEM_TCP_BACKLOG

        protected static final java.lang.String PARAM_SYSTEM_TCP_BACKLOG
        System backlog.
        See Also:
        Constant Field Values
      • PARAM_RETURN_XML_TYPE

        protected static final java.lang.String PARAM_RETURN_XML_TYPE
        Parameter name.Parameter name.Specifies the type of the SOAP Response message output from the AssemblyLine
        See Also:
        Constant Field Values
      • PARAM_INPUT_TYPE

        protected static final java.lang.String PARAM_INPUT_TYPE
        Parameter name.Specifies the type of the SOAP Request message input to the AssemblyLine
        See Also:
        Constant Field Values
      • PARAM_USE_SSL

        protected static final java.lang.String PARAM_USE_SSL
        Parameter name.Enable/Disable SSL.If checked the server will only accept SSL (https) connections
        See Also:
        Constant Field Values
      • PARAM_REQUIRE_CLIENT_AUTH

        protected static final java.lang.String PARAM_REQUIRE_CLIENT_AUTH
        Parameter name.Is client authentication required.If checked clients will be required to provide SSL certificates for client authentication
        See Also:
        Constant Field Values
      • PARAM_TAG_OPENTRY

        protected static final java.lang.String PARAM_TAG_OPENTRY
        Parameter name.Specifies whether the $operation attribute of the op-entry is set to the name of the web service operation.
        See Also:
        Constant Field Values
      • mPort

        protected int mPort
        The port number the service is running (listening) on.
      • mInputXMLType

        protected java.lang.String mInputXMLType
        Specifies the type of the SOAP Request message input to the AssemblyLine
      • mReturnXMLType

        protected java.lang.String mReturnXMLType
        Specifies the type of the SOAP Response message output from the AssemblyLine
      • mUseSSL

        protected boolean mUseSSL
        If checked the server will only accept SSL (https) connections
      • mRequireClientAuth

        protected boolean mRequireClientAuth
        If checked clients will be required to provide SSL certificates for client authentication
      • mTagOpEntry

        protected boolean mTagOpEntry
        Specifies whether the $operation attribute of the op-entry is set to the name of the web service operation.
      • mSocket

        protected java.net.Socket mSocket
        Client socket
        See Also:
        Socket
      • mServerSocket

        protected java.net.ServerSocket mServerSocket
        Server socket.
        See Also:
        ServerSocket
      • CHARSET

        protected java.lang.String CHARSET
        Charset constant.
      • ATTR_SOAP_RESPONSE

        public static final java.lang.String ATTR_SOAP_RESPONSE
        SOAP response - attribute name.
        See Also:
        Constant Field Values
      • ATTR_HOST

        public static final java.lang.String ATTR_HOST
        Host - attribute name.
        See Also:
        Constant Field Values
      • ATTR_REQUESTED_RESOURCE

        public static final java.lang.String ATTR_REQUESTED_RESOURCE
        Requested resource - attribute name.
        See Also:
        Constant Field Values
      • ATTR_SOAP_REQUEST

        public static final java.lang.String ATTR_SOAP_REQUEST
        SOAP request - attribute name.
        See Also:
        Constant Field Values
      • ATTR_SOAP_ACTION

        public static final java.lang.String ATTR_SOAP_ACTION
        SOAP action - attribute name.
        See Also:
        Constant Field Values
      • ATTR_WSDL_REQUESTED

        public static final java.lang.String ATTR_WSDL_REQUESTED
        WSDL requested - attribute name.
        See Also:
        Constant Field Values
      • ATTR_RESPONSE_CONTENT_TYPE

        public static final java.lang.String ATTR_RESPONSE_CONTENT_TYPE
        Response content type - attribute name.
        See Also:
        Constant Field Values
      • XML_STRING

        public static final java.lang.String XML_STRING
        Public constant representing XML String format.
        See Also:
        Constant Field Values
      • XML_DOM

        public static final java.lang.String XML_DOM
        Public constant representing XML DOM format.
        See Also:
        Constant Field Values
      • CONTENT_TYPE_XML

        public static final java.lang.String CONTENT_TYPE_XML
        Content type - "text/xml"
        See Also:
        Constant Field Values
      • CONTENT_TYPE_HTML

        public static final java.lang.String CONTENT_TYPE_HTML
        Content type - "text/html"
        See Also:
        Constant Field Values
      • TRUE

        protected static final java.lang.String TRUE
        Boolean value represented as String.
        See Also:
        Constant Field Values
      • FALSE

        protected static final java.lang.String FALSE
        Boolean value represented as String.
        See Also:
        Constant Field Values
      • mNoNextEntry

        protected boolean mNoNextEntry
        Next entry is not available. Default false
      • mSAXParserFactory

        protected javax.xml.parsers.SAXParserFactory mSAXParserFactory
        SAXParserFactory
    • Constructor Detail

      • WSReceiverServerConnector

        public WSReceiverServerConnector()
        Default constructor
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object obj)
                        throws java.lang.Exception
        Initialize the connector. The connector may be passed a parameter of any kind by the user. Assigns parameters specified by the user to the connector
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        obj - User provided parameter
        Throws:
        java.lang.Exception - if the initialization of this connector fails.
      • 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:
        getNextClient in interface ConnectorInterface
        Overrides:
        getNextClient in class Connector
        Returns:
        the clone of itself
        Throws:
        java.lang.Exception - : if the server socket is not specified.
      • terminateServer

        public void terminateServer()
                             throws java.lang.Exception
        Interrupts and shuts down the Connector if it runs in Server Mode. Does not have effect if the Connector is not running in Server Mode.
        Specified by:
        terminateServer in interface ConnectorInterface
        Overrides:
        terminateServer in class Connector
        Throws:
        java.lang.Exception - if an error occurs
      • terminate

        public void terminate()
                       throws java.lang.Exception
        Terminate the connector. This function closes all connection and releases all resources used by the connector.
        Specified by:
        terminate in interface ConnectorInterface
        Overrides:
        terminate in class Connector
        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.
        Specified by:
        getNextEntry in interface ConnectorInterface
        Overrides:
        getNextEntry in class Connector
        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:
        replyEntry in interface ConnectorInterface
        Overrides:
        replyEntry in class Connector
        Parameters:
        conn - Entry
        Throws:
        java.lang.Exception - if an error occurs
      • isAccepting

        public boolean isAccepting()
        Returns:
        true if the server is accepting connection, false otherwise.
      • isTerminating

        public boolean isTerminating()
        Returns:
        true if a termination request is sent , false otherwise.
      • readFile

        public java.lang.String readFile​(java.lang.String aFileName)
                                  throws java.io.IOException
        This method is supposed to be used in scripts for reading WSDL files. This method is not used by this Connector. It is a convenience method only.
        Parameters:
        aFileName - String
        Returns:
        String
        Throws:
        java.io.IOException - if an I/O error occurs
      • getAuthorization

        protected java.lang.String getAuthorization​(java.lang.StringBuffer headers)
                                             throws java.io.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:
        java.io.IOException
      • getHeaders

        protected java.lang.StringBuffer getHeaders()
                                             throws java.io.IOException
        Gets the header information send by client.
        Returns:
        Header information.
        Throws:
        java.io.IOException
      • readLine

        protected java.lang.String readLine()
                                     throws java.io.IOException
        Read line from client. This method is used when HTTP Basic Authentication is enabled.
        Returns:
        Returns the line read.
        Throws:
        java.io.IOException
      • httpAuthenticationRequest

        protected void httpAuthenticationRequest​(java.lang.String realm)
                                          throws java.io.IOException
        Send request to client to authenticate.
        Parameters:
        realm - String
        Throws:
        java.io.IOException - if an I/O error occurs