Setting up the Address Book samples to use HTTP

The sample provides both a Web service consumer and a Web service provider. You call the consumer by using WebSphere MQ, but you see only the messages that go in and out of the consumer. To see the SOAP messages that are sent between the provider and the consumer you must set up a TCP/IP Monitor; see Setting up a TCP/IP Monitor. If you do not want to see the SOAP messages, you must ensure that the consumer is configured with the correct port.

Importing and deploying the sample automatically deploys the message flows. However, if you have altered the SOAPRequest nodes to either set up a TCP/IP Monitor or change the port to the port used by the AddressBookProvider execution group, you must rebuild and redeploy the AddressBookConsumer broker archive (BAR) file.

After importing and deploying the sample you might notice a number of warnings relating to body.ns:Name, these are expected and can be ignored.

Verifying that the provider has the correct port for the consumer

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 the above command returns a port other than 7800, you must configure the SOAPRequest nodes in the consumer flow to this port, and rebuild the BAR file.

If you have set up a TCP/IP Monitor, and have already checked which port the Web services provider is using, you must configure the SOAPRequest nodes in the consumer flow to send the messages to your TCP/IP Monitor (port number mentioned on 'Local monitoring port'), and rebuild the BAR file.

To verify that the port that the SOAPRequest nodes are using is the correct port to call the provider flow or TCP/IP monitor, complete the following steps:

  1. Open the AddressBookConsumerFlow located in the AddressBook project.
  2. (Perform this step for both of your SOAPRequest nodes) Open the HTTP Transport tab in the Properties view. If the port is already correct, you have finished setting up the Address Book sample. If the port is not correct, change the port in the Web service URL field to the correct port for your Web services provider or for your TCP/IP Monitor.Soap Request Node Properties
  3. Save the message flow and rebuild the BAR file.
  4. Now you need to redeploy the BAR file.

Redeploying the BAR file

To rebuild and redeploy the consumer flow, complete the following steps:

  1. Application Development view, expand the AddressBook project and the BAR. Open the AddressSampleConsumer BAR file.
  2. Click the Prepare tab and click Build and Save.... button.
  3. Close the BAR file.
  4. Drag the AddressSampleConsumer BAR file to the AddressSampleConsumer execution group.
  5. Double-click the Event Log for your broker (IB9NODE). Ensure that the flow is deployed successfully. If any deployment errors exist, check them and ensure you have followed all of the previous steps correctly.

You have set up the Address Book sample to use HTTP.

Back to sample home