SOAP envelope

The SOAP Envelope houses the entire message structure to be delivered. It is made up of an optional Header element, and a required Body element.

SOAP header

The SOAP Header element is the location of message meta-data. Information such as username, password, action code, and transaction ID are present in the various SOAP Header elements and attributes. Username and password will correspond to an account created on the ENTERPRISE CONNECTIVITY customer portal (my.pegs.com). This account will need to be enabled for HCD updates via Web services in order for the messages to be processed.

While the SOAP specification allows the Header to be an optional element, ENTERPRISE CONNECTIVITY requires it to be present in each request. Further, the use of the ebXML:MessageHeader element, and the wsse:Security elements are also required. The following links point to the schema files for the ebXML:MessageHeader element and the wsse:Security element. Clients can reference these schemas to determine required elements and attributes.

The following table illustrates specific values that should be present in these elements.

Element

Attribute

R / O / C

Usage

Description

MessageHeader

R

SOAP-ENV:mustUnderstand

R

0

1

Indicates “true” or “false”

version

R

2.0

Indicates the ebXML version

:From

R

PartyId

R

Supplier Name

To

R

PartyId

R

ENTERPRISE CONNECTIVITY

CPAId

R

HCDUpdateInterfa ce

The destination system

ConversationId

R

some value

This value can be used by the client to group a set of transactions into a “conversation”

Service

R

HCDUpdateInterfa ce

The destination service

type

R

1.0

Defines the version of the eb:Service element

Action

R

Add Update

Upsert Delete

Defines the action to be performed on the property

MessageData

R

MessageId

R

Unique Record ID

Timestamp

R

Security

R

Defines the wsse Security element

UsernameToken

R

Defines the UsernameToken element

Username

R

user name

The client’s username will be defined by ENTERPRISE CONNECTIVITY

Password

R

password

The client’s password will be defined by ENTERPRISE CONNECTIVITY

SOAP body

The SOAP Body contains the message payload. In the case of the HCD XML Update Interface, this is an OTA_HotelDescriptiveContentNotifRQ OTA XML document.

Example of SOAP envelope

The following example SOAP Envelope shows the use of the ebXML Header and wsse Security elements within the SOAP Header.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:ns0="http://webservices.pegs.com/HCD/update_interface/HotelDescriptiveContent WS/HotelDescriptiveContentWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<env:Header>

<ns2:MessageHeader xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" ns1:mustUnderstand="false" xmlns:ns2="http://www.oasis-open.org/committees/ebxml- msg/schema/msg-header-2_0.xsd" ns2:version="2.0">

<ns2:From>

<ns2:PartyId ns2:type="partyIdType">Chain Name</ns2:PartyId> </ns2:From>

<ns2:To>

<ns2:PartyId ns2:type="partyIdType">ENTERPRISE CONNECTIVITY</ns2:PartyId>

</ns2:To>

<ns2:CPAId>HCDUpdateInterface</ns2:CPAId>

<ns2:ConversationId>ConvoID</ns2:ConversationId>

<ns2:Service ns2:type="1.0">HCDUpdateInterface</ns2:Service>

<ns2:Action>UPSERT</ns2:Action>

<ns2:MessageData>

<ns2:MessageId>ID12345</ns2:MessageId>

<ns2:Timestamp>2006-09-05T08:57:04.576-07:00</ns2:Timestamp>

</ns2:MessageData>

</ns2:MessageHeader>

<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- wssecurity-secext-1.0.xsd">

<UsernameToken>

<Username>username@pegs.com</Username>

<Password>password</Password>

</UsernameToken>

</Security>

</env:Header>

<env:Body>

<ns2:OTA_HotelDescriptiveContentNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="4.000" PrimaryLangID="en">

.

.

.

.

</ns2:OTA_HotelDescriptiveContentNotifRQ>

</env:Body>

</env:Envelope>

Action codes

The action codes are defined in the SOAPHeader/eb:MessageHeader/eb:Action element. These codes, in conjunction with the “overwrite” and “removal” flags within the OTA_HotelDescriptiveContentNotifRQ element, define what will happen to the property data within the message. The supported action codes are: Add, Update, Upsert, and Delete.

Add

An action code of “Add” is equivalent to a database “insert.”

If the action code is “Add”, all required elements and attributes must be present in the

OTA_HotelDescriptiveContentNotifRQ message. If the message fails validation, an error will be returned to the client, and no data will be stored.

If the action code is “Add”, and the property is found to exist in the HCD, an error will be returned, and the property data will not be modified.

When a property is being added to the HCD, it must contain a minimum set of data elements in order to be considered valid. The following table describes these data requirements.

Element

Attribute

OTA_HotelDescriptiveContentNotiflRQ

Version

PrimaryLangID

HotelDescriptiveContents

HotelDescriptiveContent

BrandCode

HotelCode

CurrencyCode

HotelName

HotelInfo

HotelStatus

HotelStatusCode

CategoryCodes

LocationCategory

Code

SegmentCategory

Code

HotelCategory

Code

Services

Service

Code

ProximityCode

FacilityInfo

GuestRooms

GuestRoom

ID

Amenities

Amenity

RoomAmenityCode

Policies

Policy

PolicyInfo

CheckInTime

CheckOutTime

UsualStayFree CutoffAge

KidsStayFree

TaxPolicies

TaxPolicy

Percent

Amount

ChargeUnit

Code

AreaInfo

Attractions

Attraction

AttractionCategoryCode

Code

ID

ContactInfos

ContactInfo

Addresses

Address

UseType

AddressLine

Cityname

StateProv

StateCode

Countryname

Code

Phones

Phone

PhoneLocationType

PhoneTechType

Phonenumber

Update

An action code of “Update” is equivalent to a database “update”. If the action code is “Update” and the property is not found to exist in the HCD, an error will be returned to the client.

Messages with an action code of “Update” will examine the “overwrite” and various “removal” flags that can be present in the OTA message structure to determine what course of action to take with the data in the request.

When the “overwrite” attribute in the HotelDescriptiveContent element is set to “true” (false is assumed if the attribute is not present) it causes a “refresh” of the data to occur. This means that ALL property data will be removed and re-inserted with the data in the request transaction. Any child “removal” attributes will be ignored.

Care must be taken to ensure that the resulting property record continues to meet the minimum required data elements as defined by ENTERPRISE CONNECTIVITY. If this is not the case, an error will be returned, and the property data will not be updated.

The “removal” attribute will work in a similar way. Any “removal” attribute that is set to “true” (false is assumed if the attribute is not present), causes the property data at that element level to be removed. This means that any data in the element containing the “removal” attribute, AND all the data of that element’s children, will be removed.

Again, care must be taken to ensure that the resulting property record continues to meet the minimum required data elements as defined by ENTERPRISE CONNECTIVITY. If this is not the case, an error will be returned, and the property data will not be updated.

Sample of an Update message with Removal Flag = true:

<OTA_HotelDescriptiveContentNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" PrimaryLangID="EN">

<HotelDescriptiveContents>

<HotelDescriptiveContent CurrencyCode="USD" TimeZone="CST" BrandCode="ZZ" HotelCode="AA123" HotelName="Test

Hotel" Overwrite="false">

<FacilityInfo>

<MeetingRooms>

<MeetingRoom RoomName="Meeting Room Name" Removal="true"/> </MeetingRooms>

</FacilityInfo>

</HotelDescriptiveContent>

</HotelDescriptiveContents>

</OTA_HotelDescriptiveContentNotifRQ>

Upsert

An action code of “Upsert” is equivalent to a database “Update” or “Insert”.

If an action code is “Upsert”, a search for the property’s information will be performed. If the property is found, the data contained in the “Upsert” message will be used to update the HCD. If not found and the minimum required data set is not met, an error will be returned to the client. If the minimum required data set is met, then the property will be added to the HCD.

Please refer to the action code of “Update” for the guidelines of the “Overwrite” and “Removal” flags.

Delete

An action code of “Delete” is equivalent to a database “delete”.

If the action code is “Delete”, only the following attributes will be validated:

Element

Attribute

OTA_HotelDescriptiveContentNoti flRQ

Version

PrimaryLangID

HotelDescriptiveContents

HotelDescriptiveContent

BrandCode

HotelCode

All other elements and attributes, including those of the HotelDescriptiveContent element, will be ignored. If the action code is “Delete”, and the property is not found in the database, an error will be returned to the client.

When sending an action code of Delete, the property will be deleted for all languages when the primary language code = EN (English). When sending an action code of Delete and the language code is not EN (English), only the data associated to the provided language code will be deleted.

Last updated