com.softwareag.entirex.xml.rt
Class XMLRPCService

java.lang.Object
  extended by com.softwareag.entirex.aci.BrokerService
      extended by com.softwareag.entirex.aci.RPCService
          extended by com.softwareag.entirex.xml.rt.XMLRPCService

public final class XMLRPCService
extends RPCService

XMLRPCService extends com.softwareag.entirex.aci.RPCService. In general, an XMLRPCService object is instantiated by a Broker object, a server address and an XMM file.
To create an EntireX RPC which will send input XML data and retrieve output XML data, one of the invokeXML methods can be used on an XMLRPCService object.

Since:
6.1.1.0, 7.1.1.0

Field Summary
static java.lang.String PROPERTY_DEFAULT_FAULTDOC_FORMAT
          Indicates which document protocol is used if no fault document is defined.
static java.lang.String PROPERTY_THROW_JAVA_EXCEPTION
          Indicates if a java exception is thrown or a fault document is returned.
static java.lang.String PROPERTY_USE_CHARACTER_REFERENCE
          Indicates if character reference used in document or the binary value of these characters is used.
 
Fields inherited from class com.softwareag.entirex.aci.RPCService
RELIABLE_AUTO_COMMIT, RELIABLE_CLIENT_COMMIT, RELIABLE_OFF
 
Fields inherited from class com.softwareag.entirex.aci.BrokerService
DEFAULT_WAITTIME
 
Constructor Summary
XMLRPCService(Broker broker, java.lang.String serverAddr, java.io.InputStream isXmmFile)
          Creates an XMLRPCService object.
XMLRPCService(Broker broker, java.lang.String serverAddr, java.lang.String sXmmFile)
          Creates an XMLRPCService object.
XMLRPCService(Broker broker, java.lang.String serverAddr, java.lang.String sXmmFile, java.io.InputStream isXmmFile)
          Creates an XMLRPCService object.
XMLRPCService(Broker broker, java.lang.String serverAddress, java.lang.String logicalBroker, java.lang.String logicalService, java.lang.String logialSetName, java.lang.String sXmmFile)
          Creates an XMLRPCService object.
XMLRPCService(java.lang.String sXmmFile)
          Create an XMLRPCService object.
XMLRPCService(java.lang.String logicalService, java.lang.String logicalSetName, java.lang.String sXmmFile)
          Creates an XMLRPCService object.
XMLRPCService(java.lang.String serverAddress, java.lang.String logicalBroker, java.lang.String logicalSetName, java.lang.String sXmmFile)
          Creates an XMLRPCService object.
 
Method Summary
 byte[] invokeXML(byte[] xmlDocument)
          Builds an RPC from XML input and returns result as XML output.
 void invokeXML(java.io.InputStream inputStream, java.io.OutputStream outputStream)
          Builds an RPC from XML input and returns result as XML output.
 void invokeXML(java.io.Reader xmlDocReader, java.io.Writer xmlDocWriter)
          Builds an RPC from XML input and returns result as XML output.
 java.lang.String invokeXML(java.lang.String xmlDocument)
          Builds an RPC from XML input and returns result as XML output.
 void invokeXML(javax.xml.stream.XMLStreamReader xmlStreamReader, javax.xml.stream.XMLStreamWriter xmlStreamWriter)
          Builds an RPC from XML input and returns result as XML output.
 void setUserProperty(java.lang.String key, java.lang.String value)
          Sets user-specific properties for this XMLRPCService object.
 
Methods inherited from class com.softwareag.entirex.aci.RPCService
closeConversation, closeConversationCommit, getCompression, getConversation, getMessageID, getNaturalLogon, getReliable, getRPCPassword, getRPCUserId, getStatusOfMessage, onEnter, onException, onLeave, onRetry, ping, reliableCommit, reliableRollback, setBroker, setCompression, setConversation, setLibraryName, setNaturalLogon, setReliable, setRpcLibrary, setRPCPassword, setRpcProgram, setRPCUserId, setServerAddress
 
Methods inherited from class com.softwareag.entirex.aci.BrokerService
cancelallConversations, deregister, deregisterImmediate, endallConversations, getBroker, getCharacterEncoding, getDefaultWaittime, getEnvironment, getMaxReceiveLen, getServerClass, getServerName, getServiceName, isGeneric, receive, receive, receiveAny, receiveAttachInfo, receiveOld, register, registerAttach, replyError, send, sendReceive, sendReceive, setAdjustReceiveLen, setDefaultWaittime, setEnvironment, setLogicalBroker, setLogicalBroker, setLogicalBroker, setLogicalService, setLogicalService, setMaxReceiveLen, toString, useCodePage, useCodePage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_THROW_JAVA_EXCEPTION

public static final java.lang.String PROPERTY_THROW_JAVA_EXCEPTION
Indicates if a java exception is thrown or a fault document is returned.
  • yes = java exception is thrown (default)
  • no = fault document is generated and returned.
  • See Also:
    Constant Field Values

    PROPERTY_USE_CHARACTER_REFERENCE

    public static final java.lang.String PROPERTY_USE_CHARACTER_REFERENCE
    Indicates if character reference used in document or the binary value of these characters is used. The character <,>,",',& always print as characters references independent of this flag.
  • yes = using character references
  • no = always write characters (default)
  • See Also:
    Constant Field Values

    PROPERTY_DEFAULT_FAULTDOC_FORMAT

    public static final java.lang.String PROPERTY_DEFAULT_FAULTDOC_FORMAT
    Indicates which document protocol is used if no fault document is defined.
  • xml = An XML fault document
  • soap = A SOAP fault document (default)
  • See Also:
    Constant Field Values
    Constructor Detail

    XMLRPCService

    public XMLRPCService(java.lang.String sXmmFile)
    Create an XMLRPCService object.

    Parameters:
    sXmmFile - The name of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(Broker broker,
                         java.lang.String serverAddr,
                         java.lang.String sXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    broker - The Broker to run the service.
    serverAddr - The RPC server address.
    sXmmFile - The name of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(Broker broker,
                         java.lang.String serverAddr,
                         java.io.InputStream isXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    broker - The Broker to run the service.
    serverAddr - The RPC server address.
    isXmmFile - The inputstream of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(Broker broker,
                         java.lang.String serverAddr,
                         java.lang.String sXmmFile,
                         java.io.InputStream isXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    broker - The Broker to run the service.
    serverAddr - The RPC server address.
    sXmmFile - The name of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.
    isXmmFile - The inputstream of specified XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(Broker broker,
                         java.lang.String serverAddress,
                         java.lang.String logicalBroker,
                         java.lang.String logicalService,
                         java.lang.String logialSetName,
                         java.lang.String sXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    broker - The Broker to run the service.
    serverAddress - The RPC server address.
    logicalBroker - The logical Broker (Location Transparency).
    logicalService - The logical service (Location Transparency).
    logialSetName - The logical setname (Location Transparency).
    sXmmFile - The name of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(java.lang.String logicalService,
                         java.lang.String logicalSetName,
                         java.lang.String sXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    logicalService - The logical service (Location Transparency).
    logicalSetName - The logical setname (Location Transparency).
    sXmmFile - The name of the XMM contains the information to map an XML document to an EntireX RPC and vice versa.

    XMLRPCService

    public XMLRPCService(java.lang.String serverAddress,
                         java.lang.String logicalBroker,
                         java.lang.String logicalSetName,
                         java.lang.String sXmmFile)
    Creates an XMLRPCService object.

    Parameters:
    serverAddress - The RPC server address.
    logicalBroker - The logical Broker (Location Transparency).
    logicalSetName - The logical setname (Location Transparency).
    sXmmFile - The name of XMM contains the information to map an XML document to an EntireX RPC and vice versa.
    Method Detail

    setUserProperty

    public void setUserProperty(java.lang.String key,
                                java.lang.String value)
    Sets user-specific properties for this XMLRPCService object.
    Defined Values:
  • PROPERTY_THROW_JAVA_EXCEPTION yes|no
  • PROPERTY_USE_CHARACTER_REFERENCE yes|no
  • PROPERTY_DEFAULT_FAULTDOC_FORMAT xml|soap
  • Parameters:
    key - Name of property to set.
    value - Value of property to set.

    invokeXML

    public java.lang.String invokeXML(java.lang.String xmlDocument)
                               throws BrokerException,
                                      XMLException
    Builds an RPC from XML input and returns result as XML output.

    Parameters:
    xmlDocument - The requesting XML document as string containing the RPC input data information.
    Returns:
    On success the resulting XML document is delivered as string.
    Throws:
    BrokerException
    XMLException

    invokeXML

    public byte[] invokeXML(byte[] xmlDocument)
                     throws BrokerException,
                            XMLException
    Builds an RPC from XML input and returns result as XML output.

    Parameters:
    xmlDocument - The requesting XML document as byte array containing the RPC input data information.
    Returns:
    On success the resulting XML document is delivered as byte array.
    Throws:
    BrokerException
    XMLException

    invokeXML

    public void invokeXML(java.io.Reader xmlDocReader,
                          java.io.Writer xmlDocWriter)
                   throws BrokerException,
                          XMLException
    Builds an RPC from XML input and returns result as XML output.

    Parameters:
    xmlDocReader - A reader object from where the input XML data can be retrieved.
    xmlDocWriter - A writer object the XML output can be written to after a successful RPC.
    Throws:
    BrokerException
    XMLException

    invokeXML

    public void invokeXML(javax.xml.stream.XMLStreamReader xmlStreamReader,
                          javax.xml.stream.XMLStreamWriter xmlStreamWriter)
                   throws XMLException,
                          BrokerException
    Builds an RPC from XML input and returns result as XML output.

    Parameters:
    xmlStreamReader - The requesting XML document containing the RPC input data information.
    xmlStreamWriter - containg the resulting XML document
    Throws:
    BrokerException
    XMLException

    invokeXML

    public void invokeXML(java.io.InputStream inputStream,
                          java.io.OutputStream outputStream)
                   throws BrokerException,
                          XMLException
    Builds an RPC from XML input and returns result as XML output.

    Parameters:
    inputStream - An InputStream object from where the input XML data can be retrieved.
    outputStream - A OutputStream object where the XML output can be written to after a successful RPC.
    Throws:
    BrokerException
    XMLException