Running the Address Book sample consists of putting messages through the consumer message flow or calling the provider flow directly. Two Test Clients are provided for running the Address Book sample.
Before you run the sample, verify that your Web services consumer is configured correctly for the provider and that JNDI administered objects are configured to run JMS flows. See Setting up the Address Book sample to use HTTP and Setting up the Address Book sample to use JMS transport.
If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.
The default port that Web services use is 7800, and the SOAPRequest nodes are set up to use this port. However, if this port is already in use, the port number is incremented by one.
Issue the following mqsireportproperties command to check which port your provider execution group is using:
mqsireportproperties IB9NODE -e AddressSampleProvider -o HTTPConnector -n port
If you want to verify that your Web services consumer is configured correctly, complete all of the following instructions. If you have set up a TCP/IP Monitor, you have already checked which port the Web services provider is using, but you must still configure the consumer to send the messages to your TCP/IP Monitor and then build and redeploy the broker archive (BAR) file.
To verify that the port that the SOAPRequest nodes are using is the correct port to call the provider flow, change the port of the SOAPRequest nodes to the port that the provider execution group is using by completing the following steps:
Perform this step for both of your SOAPRequest nodes.
The sample can be run with or without the TCP/IP Monitor enabled to intercept the SOAP message. The following instructions cover both cases.
Ensure that JNDI Administered objects are created, as described in Setting up the Address Book sample to use JMS transport. Also ensure that JNDI properties are set on SOAPInput and SOAPRequest nodes. Verify that the following WebSphere MQ queues are created, either through the WebSphere MQ Explorer or the WebSphere MQ command console.
How to call the consumer flow, which in turn calls the provider flow:
If the monitor is not displayed, you can add it to your workbench now: Click Window > Show View > Other > Debug > TCP/IP Monitor.
Check the contents of the inbound and outbound SOAP messages. If you want to make the message easier to read, use the menu in the TCP/IP Monitor to change the format from Byte to XML.
<SOAP_Domain_Msg> <Body> <NS2:SaveAddressResponse xmlns:NS2="http://addressbook.com/">true<NS2:SaveAddressResponse> <Body> <SOAP_Domain_Msg>
<SOAP_Domain_Msg> <Body> <NS2:Address xmlns:NS2="http://addressbook.com/"> <NS2:City>Carlisle</NS2:City> <NS2:Street>Welton</NS2:Street> <NS2:Province>Cumbria</NS2:Province> <NS2:PostalCode>NE2 3HP</NS2:PostalCode> <NS2:PhoneNumber> <NS2:Area>1</NS2:Area> <NS2:Prefix>2</NS2:Prefix> <NS2:Local>3</NS2:Local> </NS2:PhoneNumber> </NS2:Address> <Body> <SOAP_Domain_Msg>
To call the provider flow directly in the case of SOAP over HTTP:
If you have finished with this sample and had previously enabled the TCP/IP Monitor and modified the flow, you must now remove the TCP/IP monitor and change the flow back.