ebXML Module 7.1 SP1 | Understanding and Using webMethods EBXML Module | Installing and Using ebxml Module | Working with CPAs, TN Document Types, and Processing Rules | Generating Trading Partner Profiles and a TPA from a CPA
 
Generating Trading Partner Profiles and a TPA from a CPA
At design time, you can generate two Trading Networks partner profiles and a TPA from a CPA by running the wm.ip.ebxml.cpa:importCPAservice provided in the WmebXML package.
If the Trading Networks profiles and TPA already exist, the service can optionally update the existing profiles and TPA so that they contain all relevant information from the CPA. If you want the service to overwrite the existing Trading Networks profiles and TPA, set the inputs updateExistingProfiles and updateExistingTPA to true. By default, the service flags an error if the Trading Networks profiles and TPA already exist.
For an example of a service that generates two partner profiles (for example, a Buyer and a Seller) and a TPA, see the wm.ip.ebxml.cpa:importCPA service in the WmebXMLSample package.
*To generate partner profiles and a TPA from a CPA
1. In Developer, create a service that invokes the pub.file:getFile service to read the CPA file. Invoke the service pub.string:bytesToString service to convert the bytes/stream output to a string format and pass this string to the wm.ip.ebxml.cpa:importCPA service.
2. Save the service and then run it, using the CPA as the input.
3. In Trading Networks, review the profiles and TPA to make sure they are correct. In some cases, you might be required to perform minor editing of the TPA. For the TPA data schema parameters and the possible values they are allowed to have, see Trading Partner Agreement Parameters Version 2. 0 and Trading Partner Agreement Parameters Version 2. 0.
Note:
Certificates configuration is not done automatically. You must configure the certificates manually in the Trading Networks profiles.
4. At run time, the ebXML Messaging Service automatically retrieves the configuration information from the Trading Networks profiles and the TPA. For information about setting the parameters of the exportCPA and importCPA services, see CPA Folder (wm.ip.ebxml.cpa).