Class MessageOriginator
- All Implemented Interfaces:
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.
Error Management
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.
- See Also:
XML API for HCI
The 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="authDelegated"/>
<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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the objects, thechildrepresents the marshallable object to be added into the content tree.Gets the authentication that this originator has provided.getName()The name of the message originator.Gets the user session identifier.voidmarshal(XMLOutputter output) Gives an XML representation of this object, and of its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the tag being processed.voidSets the authentication for this originator.voidSets the name of the message originator.voidsetSessionId(String sessionId) Sets the user session identifier.
-
Constructor Details
-
MessageOriginator
public MessageOriginator()
-
-
Method Details
-
getName
The name of the message originator.- Returns:
- The name of the message originator
-
setName
Sets the name of the message originator.- Parameters:
n- The name of the message originator
-
getSessionId
Gets the user session identifier.- Returns:
- The user session identifier
-
setSessionId
Sets the user session identifier.- Parameters:
sessionId- The new user session identifier
-
getAuthentication
Gets the authentication that this originator has provided.- Returns:
- The authentication of this originator
-
setAuthentication
Sets the authentication for this originator.- Parameters:
auth- The authentication for this originator
-
setAttributes
Sets the attributes of the XML representation of the tag being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- The XML attributes of the current tag
-
addChild
Adds a child to the objects, thechildrepresents the marshallable object to be added into the content tree.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Adds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Gives an XML representation of this object, and of its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- The XML output to marshal the object into
-