Class MessageOriginator

java.lang.Object
com.highdeal.hci.MessageOriginator
All Implemented Interfaces:
XMLMarshallable

public class MessageOriginator extends Object implements XMLMarshallable
This 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 Details

    • MessageOriginator

      public MessageOriginator()
  • Method Details

    • getName

      public String getName()
      The name of the message originator.
      Returns:
      The name of the message originator
    • setName

      public void setName(String n)
      Sets the name of the message originator.
      Parameters:
      n - The name of the message originator
    • getSessionId

      public String getSessionId()
      Gets the user session identifier.
      Returns:
      The user session identifier
    • setSessionId

      public void setSessionId(String sessionId)
      Sets the user session identifier.
      Parameters:
      sessionId - The new user session identifier
    • getAuthentication

      public MessageAuthentication getAuthentication()
      Gets the authentication that this originator has provided.
      Returns:
      The authentication of this originator
    • setAuthentication

      public void setAuthentication(MessageAuthentication auth)
      Sets the authentication for this originator.
      Parameters:
      auth - The authentication for this originator
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Sets the attributes of the XML representation of the tag being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current tag
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Adds a child to the objects, the child represents the marshallable object to be added into the content tree.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • marshal

      public void marshal(XMLOutputter output)
      Gives an XML representation of this object, and of its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into