xBus

Processing URL's with parameters

The HTTPParameterReceiver is called with an URL containing parameters. It transforms these parameters into a XML document. The HTTPParameterSender is called with a XML document, which is transformed to parameters that will be appended to the URL before sending.

This page describes the format of the XML document, generated by the HTTPParameterReceiver resp. given to the HTTPParameterSender.

 URL

Let us assume the following URL has been used to call a HTTPParameterReceiver resp. shall be sent with a HTTPParameterSender:

http://localhost:8080/xbus/servlet/Test0021ParamReceive?Name=John+Doe&
Rank=Software+Engineer&Salary=

Note that the parameters are HTML form encoded as described in the HTML specification.

 XML document

The corresponding XML document looks like:

01 <?xml version="1.0" encoding="UTF-8"?>
02 <Test0021ParamReceive>
03     <Name>John Doe</Name>
04     <Rank>Software Engineer</Rank>
05     <Salary/>
06 </Test0021ParamReceive>

02:
The name of the root element is the name of the interface as defined in the configuration.
03 - 05:
Every parameter corresponds to one tag in the XML document, containing the value.

When sending a message with the HTTPParameterSender, the root element may contain an optional attribute specifying the URL to which the parameters shall be sent. In this case the URL must not be stored in the configuration.

The additional address information $WILDCARD$ is also understood by HTTPParameterSender and HTTPParameterReceiver. It is represented in the XML file as an attribute.

Example for both attributes:

01 <?xml version="1.0" encoding="UTF-8"?>
02 <Test0021ParamReceive url="http://localhost:8080/xbus/servlet/Test0021ParamReceive" WILDCARD="xxx">
03     <Name>John Doe</Name>
04     <Rank>Software Engineer</Rank>
05     <Salary/>
06 </Test0021ParamReceive>