public class MessageOriginator extends java.lang.Object implements XMLMarshallable
Java class represents the originator of a message sent via the HCI technical interface
to a connected SAP CC Core Server system. It is the identifier of an SAP CC user
or the identifier of a user session.
If the user session management function is enabled in the SAP CC system (see the system parameter USER_SESSION_ENABLED), the
originator must contain both a user session ID and the ID of the SAP CC user. This identifier is generated by the SAP CC system
in response to a AuthenticateUserOp operation.
This identifies the enclosing envelope as being part of a user session.
If an envelope is received by the SAP CC system with a user session identifier which does not correspond to any running user session,
an AuthenticationFailedException with the reason
invalid_session_id will be thrown.
If the user session identifier set in the originator corresponds to an existing user session, but the user specified in the
originator is not the same as the one recorded in the user session,
an AuthenticationFailedException with the reason
invalid_session_user will be thrown.
MessageHeaderThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="originator">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="auth"/>
<xs:element ref="authToken"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="sessionId" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
MessageOriginator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the objects, the
child represents
the marshallable object to be added into the content tree. |
MessageAuthentication |
getAuthentication()
Gets the authentication that this originator has provided.
|
java.lang.String |
getName()
The name of the message originator.
|
java.lang.String |
getSessionId()
Gets the user session identifier.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, and of its
children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the tag being
processed.
|
void |
setAuthentication(MessageAuthentication auth)
Sets the authentication for this originator.
|
void |
setName(java.lang.String n)
Sets the name of the message originator.
|
void |
setSessionId(java.lang.String sessionId)
Sets the user session identifier.
|
public java.lang.String getName()
public void setName(java.lang.String n)
n - The name of the message originatorpublic java.lang.String getSessionId()
public void setSessionId(java.lang.String sessionId)
sessionId - The new user session identifierpublic MessageAuthentication getAuthentication()
public void setAuthentication(MessageAuthentication auth)
auth - The authentication for this originatorpublic void setAttributes(XMLAttributes atts)
setAttributes in interface XMLMarshallableatts - The XML attributes of the current tagpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
child represents
the marshallable object to be added into the content tree.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into