Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0
Info

This page explains the URL Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to URL Adapter in the Designer guide.

GET Resource

With the <<URLAdapter>> it is also possible to access URL resources. Getting e.g. an XML file follows the same rules as a "normal" GET request. The output is an object called "response" of type blob. The value of response is the XML data encoded in a base64 string.
If these XML data should be provided as a SOAP message to the client we have to use the xmlToClass() operation. The mapping between the XML data and SOAP classes is defined in a class diagram.

The following activity and deployment diagram shows a Service which gets data from http://www.e2ebridge.com/bridgeFiles/address.xml and sends back the following data structure:

Code Block
<address id="120"> <street>Lautengartenstr. 12</street> <city>Basel</city> </address>

The following rules are valid:

  • XML attributes to class are mapped to class attributes.

  • XML elements are mapped to class associations.

For the above XML data structure this class diagram has to be defined.

Figure: Get XML Data Via HTTP/GET

Figure: <<URLALias>> for Getting XMLData


Expand
titleClick here to see the component diagram used in Builder up to version 6 ...

Figure: Component Diagram for Getting XMLData


Info
iconfalse

For more information on setting the parameters of the URL adapter dynamically refer to URL.

POST Resource

The following activity diagram shows how to create e.g. a .xml file with the URL adapter. Analogous to creating this file a HTTP/POST of xml data would be possible. The corresponding component diagram is shown above (refer to the component diagram above).

Figure: Posting (Writing) an XML File


 

The first step creates the two strings street and city which are used in the next step to associate it to the address class.
With these two steps the data is ready for the serialization to a xml data structure which is done in the third step serialize class to XML.

The operation classToXML() returns a blob and expects as input parameter a class defining the xml data structure.

Info
iconfalse

For more information on setting the parameters of the URL adapter dynamically refer to URL.

Tagged Values

Find below a list of relevant tagged values, if the URL adapter is used with the HTTP protocol.
Default values used when an option is not explicitly set are written in bold.

Multiexcerpt include
MultiExcerptNamehttp_tagged_values
nopaneltrue
PageWithExcerptUsing the URL Adapter with the HTTP Protocol

Panel
titleOn this Page:
Table of Contents
Panel
titleRelated Pages:

Otp
Floatingfalse

rp