| java.lang.Object com.sun.jbi.common.soap.MessageDenormalizerImpl
MessageDenormalizerImpl | public class MessageDenormalizerImpl implements MessageDenormalizer(Code) | | This Basic Profile 1.0 aware implementation is used to denormalize a JBI Normalized
Message and convert it into a SOAP message format.
author: Sun Microsystems, Inc. |
Method Summary | |
protected void | closeWriter(Writer writer) Closes the writer instance. | protected SOAPMessage | createSOAPMessage(ByteArrayOutputStream byteStream) Uses the provided input data to create a javax.xml.soap.SOAPMessage
instance.
Parameters: byteStream - Stream which contains the soap messages information as bytes. | public SOAPWrapper | denormalizeFaultMessage(Fault faultMessage) Converts a JBI Fault mesage to a standard javax.xml.soap.SOAPMessage
message instance. | public SOAPWrapper | denormalizeFaultMessage(Fault faultMessage, String faultCode) Converts a JBI Fault mesage to a SOAP Message using the specified fault code. | public SOAPWrapper | denormalizeMessage(NormalizedMessage normalizedMessage, Operation operation, boolean isResponse) Converts a JBI normalized message to a javax.jbi.soap.SOAPMessage
instance. | public SOAPWrapper | denormalizeMessage(Exception exception) Converts an exception to a SOAP Message. | public SOAPWrapper | denormalizeMessage(Exception exception, String faultCode) Converts an exception to a SOAP Message using the provided faultCode. | protected String | sanitizeMessage(String errorMessage) Sanitizes the messages so that it can be properly read by an XML parser.
Parameters: errorMessage - error message to be sanitized. | protected void | writeBody(NormalizedMessage normalizedMessage, Operation operation, boolean isResponse, Writer writer) This method extracts the payload from the Normalized Message and writes it
using the writer stream. | protected void | writeBodyFooter(Operation operation, Writer writer, boolean isEmptyResponse) Uses writer object to write the SOAP:Body footer information. | protected void | writeBodyHeader(Operation operation, Writer writer, boolean isEmptyResponse) Uses the writer object to write the SOAP:Body header information. | protected void | writeEnvelopeFooter(Writer writer) Uses writer object to write the SOAP:Envelope footer information. | protected void | writeEnvelopeHeader(Writer writer) Uses writer object to write the SOAP:Envelope header information. | protected void | writeFault(Exception exception, String faultCode, Writer writer) Create the SOAP:Fault message based on the provided exception details and writes
it using the writer instance. | protected void | writeHeader(NormalizedMessage normalizedMessage, Writer writer) The method extracts the header information from the Normalized Message property
"SoapHeader" and writes it using the writer instance. |
MessageDenormalizerImpl | public MessageDenormalizerImpl()(Code) | | Creates a new instance of MessageDenormalizerImpl.
|
closeWriter | protected void closeWriter(Writer writer)(Code) | | Closes the writer instance. This method handles any exceptions thrown
while handling this request.
Parameters: writer - writer instance. |
createSOAPMessage | protected SOAPMessage createSOAPMessage(ByteArrayOutputStream byteStream) throws SOAPException, IOException(Code) | | Uses the provided input data to create a javax.xml.soap.SOAPMessage
instance.
Parameters: byteStream - Stream which contains the soap messages information as bytes. SOAP Message object throws: SOAPException - if soap message object cannot be created. throws: IOException - if soap message object cannot be created. |
denormalizeFaultMessage | public SOAPWrapper denormalizeFaultMessage(Fault faultMessage)(Code) | | Converts a JBI Fault mesage to a standard javax.xml.soap.SOAPMessage
message instance. It uses the default Server fault code for denormalization.
Parameters: faultMessage - JBI fault message. a new SOAPWrapper instance which contains the SOAP fault Message. |
denormalizeFaultMessage | public SOAPWrapper denormalizeFaultMessage(Fault faultMessage, String faultCode)(Code) | | Converts a JBI Fault mesage to a SOAP Message using the specified fault code.
Parameters: faultMessage - JBI fault message. Parameters: faultCode - fault code to be used in the fault message a new SOAPWrapper instance which contains the SOAP fault Message. |
denormalizeMessage | public SOAPWrapper denormalizeMessage(NormalizedMessage normalizedMessage, Operation operation, boolean isResponse)(Code) | | Converts a JBI normalized message to a javax.jbi.soap.SOAPMessage
instance. The SOAP Header information is extracted from the NormalizedMessage
property "SoapHeader" and the SOAP Body content is extracted from the Normalized
Message content. Any attachments present in the NormalizedMessage are also
denormalized and added to the created javax.jbi.soap.SOAPMessage
instance.
Parameters: normalizedMessage - message to be denormalized. Parameters: operation - operation invoked Parameters: isResponse - indicates if a response messages needs to be generated the SOAP Message. |
denormalizeMessage | public SOAPWrapper denormalizeMessage(Exception exception)(Code) | | Converts an exception to a SOAP Message. It uses the default Server fault code
for denormalization.
Parameters: exception - exception instance denormalized exception object |
denormalizeMessage | public SOAPWrapper denormalizeMessage(Exception exception, String faultCode)(Code) | | Converts an exception to a SOAP Message using the provided faultCode. The code
expects the faultcode passed to be part of the soap namespace.
Parameters: exception - exception instance Parameters: faultCode - fault code denormalized exception object |
sanitizeMessage | protected String sanitizeMessage(String errorMessage)(Code) | | Sanitizes the messages so that it can be properly read by an XML parser.
Parameters: errorMessage - error message to be sanitized. sanitized error message. |
writeBody | protected void writeBody(NormalizedMessage normalizedMessage, Operation operation, boolean isResponse, Writer writer) throws Exception(Code) | | This method extracts the payload from the Normalized Message and writes it
using the writer stream. The payload content is enclosed between the SOAP:Body
header and SOAP:Body footer information.
Parameters: normalizedMessage - normalized message Parameters: operation - operation invoked Parameters: isResponse - indicates if a response messages needs to be generated Parameters: writer - writer object to be used throws: Exception - if the body cannot be written |
writeBodyFooter | protected void writeBodyFooter(Operation operation, Writer writer, boolean isEmptyResponse) throws Exception(Code) | | Uses writer object to write the SOAP:Body footer information. This method is
invoked after the body payload has been written.
Parameters: operation - operation invoked Parameters: writer - writer object. Parameters: isEmptyResponse - indicates if a response messages needs to be generated throws: Exception - if body footer cannot be written |
writeBodyHeader | protected void writeBodyHeader(Operation operation, Writer writer, boolean isEmptyResponse) throws Exception(Code) | | Uses the writer object to write the SOAP:Body header information. This method
is invoked before the body payload is written.
Parameters: operation - operation invoked Parameters: writer - writer object to be used Parameters: isEmptyResponse - indicates if an empty response message needs to be generated throws: Exception - if body header cannot be written. |
writeEnvelopeFooter | protected void writeEnvelopeFooter(Writer writer) throws IOException(Code) | | Uses writer object to write the SOAP:Envelope footer information. This method
is invoked after writing the envelope content ( header and body content).
Parameters: writer - writer object throws: IOException - if envelope footer information cannot be written. |
writeEnvelopeHeader | protected void writeEnvelopeHeader(Writer writer) throws IOException(Code) | | Uses writer object to write the SOAP:Envelope header information. This method
is invoked before writing the envelope content ( header and body content).
Parameters: writer - writer object. throws: IOException - if envelope header information cannot be written. |
writeFault | protected void writeFault(Exception exception, String faultCode, Writer writer) throws IOException(Code) | | Create the SOAP:Fault message based on the provided exception details and writes
it using the writer instance.
Parameters: exception - exception thrown Parameters: faultCode - fault code Parameters: writer - writer object throws: IOException - if fault message cannot be generated. |
writeHeader | protected void writeHeader(NormalizedMessage normalizedMessage, Writer writer) throws Exception(Code) | | The method extracts the header information from the Normalized Message property
"SoapHeader" and writes it using the writer instance. The header information
is expected to be propagated as a javax.xml.soap.SOAPHeader
implementation instance.
Parameters: normalizedMessage - normalizedMessage Parameters: writer - writer object to be used throws: Exception - if header cannot be used to write to the writer instance |
|
|