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.
![*](icon_task_xpe.png)
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.
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).