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:

<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


Figure: Component Diagram for Getting XMLData


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

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.

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

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.

Tagged ValueDescriptionValues
protocolTransport protocol.http, https

method

HTTP method.get, post, put

port

Machine port number the service is binding to. This port number can be given at service level only.

80

path

HTTP path for the request.
Advanced
followRedirectsMaximum number of redirects to follow.any integer
optionsNative cURL options.cURL Options
Authentication
userUsername/password.
Proxy
proxyTypeType of the proxy.HTTP, SOCKS5
proxyURLURL of the proxy server.
proxyUserProxy user.
SSL
sslCAInfoFile name containing additional certificates for the connection verification (e.g. additional root CAs).
sslCertificateFileFile name containing the client certificate.
sslCertificateTypeType of the certificate.PEM, DER
sslPrivateKeyFileFile name containing the private key.
sslPrivateKeyPasswordPassword for the private key.
sslPrivateKeyTypeType of the key.
sslVerifyHostWhether to verify the host information form the SSL connection.OnVerification on.
OffVerification off.
sslVerifyPeerWhether to verify the peer information from the SSL connection.OnVerification on.
OffVerification off.

  • No labels