com.sun.xml.messaging.jaxm.ebxml
Class EbXMLMessageImpl

java.lang.Object
  extended byjavax.xml.soap.SOAPMessage
      extended bycom.sun.xml.messaging.saaj.soap.MessageImpl
          extended bycom.sun.xml.messaging.jaxm.util.ProfileMessage
              extended bycom.sun.xml.messaging.jaxm.ebxml.EbXMLMessageImpl

public class EbXMLMessageImpl
extends com.sun.xml.messaging.jaxm.util.ProfileMessage

The message implementation for ebxml messages. This class currently supports setters and getters for the mandatory parts of the ebxml message header.


Field Summary
static org.apache.commons.logging.Log logger
           
 
Constructor Summary
EbXMLMessageImpl()
          Construct a new message.
EbXMLMessageImpl(javax.xml.soap.MimeHeaders headers, java.io.InputStream in)
          Construct a message from an input stream.
EbXMLMessageImpl(javax.xml.soap.SOAPMessage message)
           
 
Method Summary
 java.lang.String getAction()
          Returns the action for the message.
 java.lang.String getConversationId()
          Returns the conversation id for the message.
 java.lang.String getCPAId()
          Returns the cpa id.
 javax.xml.messaging.Endpoint getFrom()
           
 Manifest getManifest()
          Returns the manifest for the message.
 java.lang.String getMessageHeaderVersion()
          Returns the version of the ebxml header.
 java.lang.String getMessageId()
          Returns the message id for the message.
 Party getReceiver()
          Returns the receiver of this message.
 java.lang.String getRefToMessageId()
          Returns the ref to message id for the message.
 Party getSender()
          Returns the sender of this message.
 com.sun.xml.messaging.jaxm.util.SerializableMessage getSerializableMessage()
           
 Service getService()
          Returns the service.
 javax.xml.messaging.Endpoint getTo()
           
 void saveChanges()
           
 void setAction(java.lang.String action)
          Set the action field for the message.
 void setConversationId(java.lang.String conversationId)
          Sets the conversation id for the message.
 void setCPAId(java.lang.String cpaId)
          Sets the CPAId for the message.
 void setManifest(Manifest manifest)
          Sets the manifest for the message in the SOAPBody.
 void setMessageHeaderVersion(java.lang.String version)
          Sets the version of the message header.
 void setReceiver(Party receiver)
          Set the receiver of the message.
 void setRefToMessageId(java.lang.String refToMessageId)
          Sets the ref to message id.
 void setSender(Party sender)
          Set the sender of the message.
 void setService(Service service)
          Sets the service information as defined in the ebxml specification.
 
Methods inherited from class com.sun.xml.messaging.saaj.soap.MessageImpl
addAttachmentPart, countAttachments, createAttachmentPart, getAttachments, getAttachments, getContentDescription, getMimeHeaders, getSOAPPart, removeAllAttachments, saveRequired, setContentDescription, writeTo
 
Methods inherited from class javax.xml.soap.SOAPMessage
createAttachmentPart, createAttachmentPart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.apache.commons.logging.Log logger
Constructor Detail

EbXMLMessageImpl

public EbXMLMessageImpl()
                 throws javax.xml.soap.SOAPException
Construct a new message.

Throws:
javax.xml.soap.SOAPException - if there is a problem in creating the ebxml message object.

EbXMLMessageImpl

public EbXMLMessageImpl(javax.xml.soap.MimeHeaders headers,
                        java.io.InputStream in)
                 throws java.io.IOException,
                        javax.xml.soap.SOAPException
Construct a message from an input stream. When messages are received, there's two parts -- the transport headers and the message content in a transport specific stream.

Parameters:
headers - the mime headers of the message.

EbXMLMessageImpl

public EbXMLMessageImpl(javax.xml.soap.SOAPMessage message)
                 throws java.io.IOException,
                        javax.xml.soap.SOAPException
Method Detail

saveChanges

public void saveChanges()
                 throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

setMessageHeaderVersion

public void setMessageHeaderVersion(java.lang.String version)
                             throws javax.xml.soap.SOAPException
Sets the version of the message header. Currently the only value supported is 1.0 as defined in the ebxml specification.

Parameters:
version - - The version of the header.
Throws:
javax.xml.soap.SOAPException - is thrown when the version is set to anything other than "1.0"

getMessageHeaderVersion

public java.lang.String getMessageHeaderVersion()
Returns the version of the ebxml header.


getSender

public Party getSender()
Returns the sender of this message.

Returns:
Party the sending party.
See Also:
Party

setSender

public void setSender(Party sender)
Set the sender of the message.

See Also:
Party

getReceiver

public Party getReceiver()
Returns the receiver of this message.

Returns:
Party the sending party.
See Also:
Party

setReceiver

public void setReceiver(Party receiver)
Set the receiver of the message.

See Also:
Party

getFrom

public javax.xml.messaging.Endpoint getFrom()

getTo

public javax.xml.messaging.Endpoint getTo()

setService

public void setService(Service service)
Sets the service information as defined in the ebxml specification.

See Also:
Service

getService

public Service getService()
Returns the service.

Returns:
Service information for the message.
See Also:
Service

setAction

public void setAction(java.lang.String action)
Set the action field for the message.


getAction

public java.lang.String getAction()
Returns the action for the message.

Returns:
String the action for the message.

setManifest

public void setManifest(Manifest manifest)
Sets the manifest for the message in the SOAPBody.

See Also:
Manifest

getManifest

public Manifest getManifest()
Returns the manifest for the message.

Returns:
Manifest - the manifest for the message.
See Also:
Manifest

getMessageId

public java.lang.String getMessageId()
Returns the message id for the message.

Returns:
String the message id for the message.

getRefToMessageId

public java.lang.String getRefToMessageId()
Returns the ref to message id for the message.

Returns:
String the ref to message id.

setRefToMessageId

public void setRefToMessageId(java.lang.String refToMessageId)
Sets the ref to message id.


setCPAId

public void setCPAId(java.lang.String cpaId)
Sets the CPAId for the message.


getCPAId

public java.lang.String getCPAId()
Returns the cpa id.

Returns:
String - the cpa id.

setConversationId

public void setConversationId(java.lang.String conversationId)
Sets the conversation id for the message.


getConversationId

public java.lang.String getConversationId()
Returns the conversation id for the message.

Returns:
String - the conversation id.

getSerializableMessage

public com.sun.xml.messaging.jaxm.util.SerializableMessage getSerializableMessage()