|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aselect.system.communication.server.soap11.SOAP11MessageCreator
public class SOAP11MessageCreator
Message creator which uses SOAP 1.1 messages.
Description:
A SOAP 1.1 implementation of the IMessageCreatorInterface
.
The SOAP11MessageCreator
parses the request message to an XML
DOM object and validates it manually against the SOAP 1.1 XML Schema. If the
request can�t be parsed, a SOAP Fault message will be sent directly. The XML
DOM object containing the request message is used as a buffer; the object
will be removed if the response message is sent.
The parameters for the response message will be buffered in a XML Document
object. This object will be serialized to a valid SOAP 1.1 response message
when the send()
method is called.
This implementation uses the Xerces XML parser and DOM objects implementation
(xercesImpl.jar and xml-apis.jar). For more info about Xerces see: Xerces Java Parser
documentation
Note: The SOAP request isn�t validated to the full W3C SOAP 1.1 XML
Schema, but only checked if the information can be retrieved from the message
in the way that the XML schema describes. Full schema validation can be
turned on by uncomment some code in createInputMessage()
method, but slows down the parsing extremely.
Concurrency issues:
The used Xerces implemenations are non threadsafe and therefore every SOAP
request requires its own SOAP11MessageCreator
.
Constructor Summary | |
---|---|
SOAP11MessageCreator(java.lang.String sMethodEnv,
java.lang.String sMethodName,
SystemLogger systemLogger)
Creates a new instance. |
Method Summary | |
---|---|
java.lang.String[] |
getArray(java.lang.String sName)
Get array Parameter values from this SOAP 1.1 message. |
java.lang.String |
getParam(java.lang.String sName)
Returns a Parameter from the input SOAP message. |
boolean |
init(IProtocolRequest oRequest,
IProtocolResponse oResponse)
Initializes the SOAP11MessageCreator . |
boolean |
send()
Sends the output message. |
boolean |
setParam(java.lang.String sName,
java.lang.String sValue)
Sets a parameter in the SOAP output message. |
boolean |
setParam(java.lang.String sName,
java.lang.String[] saValue)
Sets an array parameter in the SOAP output message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SOAP11MessageCreator(java.lang.String sMethodEnv, java.lang.String sMethodName, SystemLogger systemLogger)
SOAP11MessageCreator
with the given values.
All other instance variables are initalized with default values. sMethodEnv
should be a valid URI.sMethodName
should be a non empty String
.
systemLogger
should be initialized.
sMethodEnv
- The method environment URI for the RPC body.sMethodName
- the method name for the RPC body.systemLogger
- The logger that is used to log system entries.Method Detail |
---|
public boolean init(IProtocolRequest oRequest, IProtocolResponse oResponse) throws ASelectCommunicationException
SOAP11MessageCreator
.
init
in interface IMessageCreatorInterface
oRequest
- The request to create an input message from.oResponse
- The response to write the output message to.
ASelectCommunicationException
- if communication fails.IMessageCreatorInterface.init(org.aselect.system.communication.server.IProtocolRequest,
org.aselect.system.communication.server.IProtocolResponse)
public java.lang.String getParam(java.lang.String sName) throws ASelectCommunicationException
getParam
in interface IInputMessage
sName
- The name of the parameter to return.
ASelectCommunicationException
- If parameter retrieving fails.IInputMessage.getParam(java.lang.String)
public java.lang.String[] getArray(java.lang.String sName) throws ASelectCommunicationException
getArray
in interface IInputMessage
sName
- The name of the parameter to return.
ASelectCommunicationException
- If parameter retrieving fails.IInputMessage.getArray(java.lang.String)
public boolean setParam(java.lang.String sName, java.lang.String sValue) throws ASelectCommunicationException
setParam
in interface IOutputMessage
sName
- The name of the parametersValue
- The value of the parameter
ASelectCommunicationException
- If communication fails.IOutputMessage.setParam(java.lang.String,
java.lang.String)
public boolean setParam(java.lang.String sName, java.lang.String[] saValue) throws ASelectCommunicationException
setParam
in interface IOutputMessage
sName
- The name of the parametersaValue
- The values of the parameter
ASelectCommunicationException
- If communication fails.IOutputMessage.setParam(java.lang.String,
java.lang.String[])
public boolean send() throws ASelectCommunicationException
XMLSerializer
to serialize
the message.
send
in interface IOutputMessage
ASelectCommunicationException
- If communication fails.IOutputMessage.send()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |