Getting Started
This section will introduce you to all the information that you are going to need in order to start your integration. You will be given access to all the resources detailed in this section as soon as your registration has been approved.
Information you will need
Test environment endpoint:
Live environment endpoint:
http://api.stuba.com/RXLServices/ASMX/XmlService.asmx
(This is a default URL. An alternative URL may be provided alongside your live credentials, and you should always use the URL provided)
Agency Details:
These have 4 parts:
Org
User
Password
Currency
How to send XML requests
The simplest method of sending a request is to send the XML directly in the body of an HTTP POST. The raw HTTP data for such a request looks like:
POST [The path to the Web service] HTTP/1.1
Content-Type: text/xml
Content-Length: [Length of the content]
Host: [Web service hostname]
<AvailabilitySearch>
<Authority>
<Org>[Your login organisation]</Org>
<User>[Your login username]</User>
<Password>[Your password]</Password>
<Currency>[Your currency]</Currency>
<Version>[Required version (currently 1.28)]</Version>
</Authority>
</AvailabilitySearch>
In practice though, most development platforms provide a simple mechanism to send such a request without the need to generate the headers yourself.
WSDL
The Stuba interface provides a definition of the interface in WSDL format – this describes the interface, and many programming environments will automatically generate a set of helper classes from the WSDL definition.
The WSDL definition will be located at:
http://www.stubademo.com/RXLStagingServices/ASMX/XmlService.asmx?WSDL
Using WSDL in Microsoft Visual Studio
From within the Visual Studio IDE, you can use the WSDL definition as follows:
• Select ‘Add Web Reference’ from the Project menu
• Enter the URL as described above in the dialog
• Click ‘Go’ to download the WSDL file
• Choose a name, and click ‘Add Reference’
Having imported the WSDL file in this way, the IDE will generate a set of helper classes which encapsulate the interface.
Web service operations
The Stuba Web Service Interface is implemented as a dual XML and SOAP interface using Microsoft .NET XML web services. The interface is exposed via:
http://www.stubademo.com/RXLStagingServices/ASMX/XmlService.asmx
If you navigate to this URL in a web browser, the .NET web services framework will display descriptions of the interfaces and their methods and offer SOAP schema downloads to simplify generating client applications. XSD schemas for the XML interface can also be obtained directly from the system at the same URL.
The rest of this chapter will be written to describe the syntax of the XML interface. The SOAP interface uses data structures equivalent to the complex elements of the XML interface. These can be constructed from the WSDL schema: http://www.stubademo.com/RXLStagingServices/ASMX/XmlService.asmx?WSD
HTTP compression
The Stuba Web Service Interface supports HTTP 1.1 compression. Clients must take advantage of compression by ensuring that requests to the interface specify the HTTP header:
Accept-Encoding: gzip,deflate
If this is specified on any request, then the corresponding response will be returned in a compressed format. We recommend that this header is specified for all requests as it can offer a significant performance improvement, especially for large availability searches.