WebSphere DataPower B2B Appliance XB60 sample
This sample has been developed to demonstrate a potential solution for a B2B scenario using WebSphere® MQ File Transfer Edition and WebSphere DataPower® B2B Appliance XB60. The sample consists of this topic and a .zip file on the WebSphere MQ File Transfer Edition V7.0.2 Remote Tools and Documentation DVD. The sample is not certified for use in a production environment. Contact your local IBM® representative if you require a B2B solution.
Prerequisites
- Access to a WebSphere DataPower B2B Appliance XB60.
- A good understanding of an XB60 appliance.
- An understanding of WebSphere MQ File Transfer Edition concepts, in particular how to configure a WebSphere MQ network and how to create agents.
Sample description
The sample provided demonstrates how a DataPower appliance can deal with an incoming request by routing a file onto an NFS mount and using WebSphere MQ File Transfer Edition to move that file between agents. The sample is a .zip file that contains all of the required objects. You must make some minor configuration changes, which are detailed below. To simulate the incoming AS2 request, use the NetTool tool that you can download from SourceForge: http://sourceforge.net/projects/nettool/
Implementing the sample
Before you can use this sample you must have a WebSphere MQ File Transfer Edition network setup that is ready to use. The sample requires you to configure two agents correctly. The sample also requires that you have set up an NFS share on the source agent's host. This is because the DataPower appliance transfers the file using NFS to the source agent's file system, and then starts the transfer. For more information on NFS, refer to your operating system instructions.
- Import the wmqfte-export.zip file into your DataPower XB60 appliance and accept all the imported files.
- Alter the MQ Queue Manager Object fte_queue_manager to your own configuration. Change the host name, queue manager name, and, depending on your queue manager setup, the channel name.
- Modify the B2B Partner Profile called mqfte-internal-partner.
- In the Destinations tab, change the Destination URL.
- Change the DestAgentName property from destination_agent to your required agent name.
- Change the DestAgentQMgr property to be your agent's queue manager. For example, if you have an agent called B2B_DEST_AGENT on queue manager UTOPIA, you have the following line: http://127.0.0.1:10224/?DestAgentName=B2B_DEST_AGENT&DestAgentQMgr=UTOPIA
- Navigate to Edit Multi-Protocol Gateway via Services Multi-Protocol Gateway, and click mqfte-http-nfs-proxy.
- Edit the Multi-Protocol Gateway Policy called mqftep-http-proxy-policy by
clicking on the ellipsis (...).
You must make changes to the
'mqftep-http-proxy-policy_rule_0_xform_0' Transform object. Double
click on the Transform icon. Click on the Advanced tab
and edit the following properties:
- DestinationURL
- Replace your_nfs_server with a fully-qualified host name. Replace nfs/path with the NFS mount that you want to use. Ensure there is a trailing forward slash (/) character otherwise this will not work correctly.
- HostName
- Host name or IP address of the DataPower appliance
- MQFTENotificationTarget
- Change the SYSTEM.FTE.AGENTNAME.COMMAND to be the command queue of the source agent
- SrcAgentName
- Name of the source agent
- SrcAgentQMgr
- Name of the source agent's queue manager
- UserID
- User that you want the transfer to be associated with
When you have completed editing, click Done. Click Apply Policy and ensure you click Apply on the Multi-Protocol Gateway.
- Enable NFS Dynamic Mounts. Under Network Settings -> NFS Dynamic Mounts, click enabled and Apply. Ensure that the default domain has this option enabled. Contact your DataPower administrator for more information.
- Click Save Config in the top right corner.
- Ensure that your source agent has a transfer root that is the same as the NFS share that you have configured. See the Properties for more information on how to set this up.
Simulate AS2 incoming request
As mentioned previously, the tool to simulate the AS2 request is called NetTool. You can download NetTool from SourceForge at: http://sourceforge.net/projects/nettool/- Set the Request type to POST
- Change the URL to the following: http://XB60.IP.Address:10223
- Add the following Headers to the Request Headers:
Name Value Content-Type application/xml Content-Type application/xml Message-ID <unique number> AS2-To IntPartner AS2-From ExtPartner - Add the following dummy XML to the body:
<tns:edi-info xmlns:tns="http://datapower.com/b2b/edi-info"> <tns:envelope-type>EDIFACT</tns:envelope-type> <tns:sender-id>as2-out-sender</tns:sender-id> <tns:receiver-id>as2-out-receiver-mdn-async-unsigned</tns:receiver-id> <tns:transaction-type>IFTMAN</tns:transaction-type> <tns:transaction-type>IFTMAN</tns:transaction-type> <tns:transaction-type>IFTMAN</tns:transaction-type> <tns:transaction-type>IFTMAN</tns:transaction-type> </tns:edi-info>
- Click Send. The log at the bottom of the window indicates the outcome of the request. A Response Status value of 200 indicates that you successfully sent a request to the DataPower appliance.
When you send the HTTP Request, you should have a file transfer occur between the two agents that you configured above, and this will be reflected in the WebSphere MQ Explorer plug-in that WebSphere MQ File Transfer Edition supplies. You can also check for the existence of the file in the transfer root of the destination agent.
Problem determination
To assist you with any problems you might have, here are some things to check, enable, or monitor that should help you understand the issues.- Check the logs
- The XB60 outputs information to its logs when it receives a request and traces the request route through the system. You can access the logs from the control panel page.
- Increase log verbosity
- If you are still having problems with the setup, you can increase the log verbosity. From the control panel, click the TroubleShooting link.
- Enable the Multi-Protocol Gateway Probe
- You can view more detailed information of your request by enabling
a Probe for the Multi-Protocol Gateway mqfte-http-nfs-proxy.
- From the control panel, click TroubleShooting
- Click Debug Probe
- Select the mqfte-http-nfs-proxy and click Add Probe
- Resubmit an HTTP Request.
- When you have enabled a probe and resubmitted the request, return to the Debug Probe page, and click on the magnifying glass to view the request in detail.
- WebSphere MQ Explorer plug-in
- You can use the plug-in that WebSphere MQ File Transfer Edition uses in WebSphere MQ Explorer to see if the transfer request status.
- Other problems
- Connection Refused using NetTool to send request: check that your IP address is correct for sending the request and check the Port Status on the XB60 Appliance
- NFS failure: check the permissions on the exported file system and ensure that the DataPower appliance has been authorized to access the exported file system. See your platforms NFS instructions for how to do this.