Package com.softwareag.entirex.xml.rt
Class XMLRPCService
- java.lang.Object
-
- com.softwareag.entirex.aci.BrokerService
-
- com.softwareag.entirex.aci.RPCService
-
- 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
Fields Modifier and Type Field Description 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.-
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
Constructors Constructor Description 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(java.lang.String sXmmFile)
Create an XMLRPCService object.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getCorrelationIDOfReply()
Gets the messageID of the RPC response.java.lang.String
getMessageIDOfRequest()
Gets the messageID of the RPC request.int
getRPCVersion()
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.
Defined Values: PROPERTY_THROW_JAVA_EXCEPTION yes|no PROPERTY_DEFAULT_FAULTDOC_FORMAT xml|soap PROPERTY_DEFAULT_XMLSPACE preservevoid
useCodePage(boolean b)
Deprecated.-
Methods inherited from class com.softwareag.entirex.aci.RPCService
closeConversation, closeConversationCommit, getConversation, getLibraryName, getMessageID, getNaturalLogon, getProgramName, getReliable, getRPCPassword, getRPCUserId, getStatusOfMessage, onEnter, onException, onLeave, onRetry, ping, reliableCommit, reliableRollback, setBroker, setConversation, setLibraryName, setNaturalLogon, setReliable, setRPCPassword, setRPCUserId, setServerAddress
-
Methods inherited from class com.softwareag.entirex.aci.BrokerService
cancelallConversations, deregister, deregisterImmediate, endallConversations, getBroker, getCharacterEncoding, getCharset, getDefaultWaittime, getMaxReceiveLen, getServerClass, getServerName, getServiceName, isGeneric, receive, receive, receiveAny, receiveAttachInfo, receiveOld, register, registerAttach, replyError, send, sendReceive, sendReceive, setCharacterEncoding, setDefaultWaittime, setMaxReceiveLen, toString
-
-
-
-
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_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.
-
-
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_DEFAULT_FAULTDOC_FORMAT xml|soap
- PROPERTY_DEFAULT_XMLSPACE preserve
- Parameters:
key
- Name of property to set.value
- Value of property to set.
-
getRPCVersion
public int getRPCVersion()
- Returns:
- The actual RPC version in base class.
-
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
-
useCodePage
@Deprecated public void useCodePage(boolean b)
Deprecated.
-
getMessageIDOfRequest
public java.lang.String getMessageIDOfRequest()
Description copied from class:RPCService
Gets the messageID of the RPC request.- Overrides:
getMessageIDOfRequest
in classRPCService
- Returns:
- the messageID of the RPC request.
-
getCorrelationIDOfReply
public java.lang.String getCorrelationIDOfReply()
Description copied from class:RPCService
Gets the messageID of the RPC response.- Overrides:
getCorrelationIDOfReply
in classRPCService
- Returns:
- the messageID of the RPC response.
-
-