Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
After setting up the samples, you can run them using sample clients. The sample clients can be executed from the
<EI_HOME>/samples/axis2Client directory by specifying the relevant
You can execute
ant from the
<EI_HOME>/samples/axis2Client directory, in order to view the available sample clients and some of the sample options used to configure them.
This section describes the following sample clients in detail.
Stock Quote client
This is a simple SOAP client that can create and send stock quote requests, as well as receive and display the last sale price for a stock symbol.
The required stock symbol and operation can be specified as follows:
The stock quote client is able to operate in the smart client mode, gateway/dumb client mode as well as proxy client mode, and can send the payloads listed below as SOAP messages:
- quote - Sends a quote request for a single stock as follows. The response contains the last sale price for the stock which would be displayed.
- customquote - Sends a quote request in a custom format. WSO2 Enterprise Integrator would transform this custom request into the standard stock quote request format and send it to the service. Upon receipt of the response, it would be transformed again to a custom response format and would be returned to the client, which will then display the last sales price.
- fullquote - Gets quote reports for the stock over a number of days (for example, for the last 100 days of the year).
- placeorder - Places an order for stocks using a one way request.
- marketactivity - Gets a market activity report for the day (for example, quotes for multiple symbols).
Smart client mode
addurl property sets the WS-Addressing EPR, and the
trpurl sets a transport URL for a message. Therefore, by specifying both properties, the client can operate in the
smart client mode, where the addressing EPR can specify the ultimate receiver, and the transport URL set to WSO2 Enterprise Integrator ensures that any mediation required takes place before the message is delivered to the ultimate receiver. For example:
Gateway / dumb client mode
By specifying only a transport URL, the client operates in the
dumb client mode, where it sends the message to WSO2 Enterprise Integrator and depends on WSO2 Enterprise Integrator rules for proper mediation and routing of the message to the ultimate destination.
Proxy client mode
The client uses the
prxurl as an HTTP proxy to send the request. Therefore, by setting the
prxurl to WSO2 Enterprise Integrator, the client ensures that the message is sent to WSO2 Enterprise Integrator for mediation. The client can optionally set a WS-Addressing EPR if required.
Generic JMS client
This is a client that can send plain text, plain binary content, or POX content by directly publishing a JMS message to a specified destination. The JMS destination name should be specified with the
jms_dest property. The
jms_type property can be text, binary or pox to specify the type of message payload.
The plain text payload for a text message can be specified through the
payload property. For binary messages, the
payload property will contain the path to the binary file. For POX messages, the
payload property will hold a stock symbol name to be used within the POX request for stock order placement request.
Be sure that you have ActiveMQ or any other JMS provider installed to run the JMS samples.
This is a client that can send a binary image file as a MTOM or SwA optimized message, and receive the same file again through the response and save it as a temporary file. The
opt_mode can be
swa respectively for the optimization. Optionally, the path to a custom file can be specified through the
opt_file property, and the destination address can be changed through the
opt_url property if required.
This is a client that can post a FIX message of type Order-Single embedded into a SOAP message.
This is a client that can send get-quote requests using the JSON content interchange format over HTTP.