For some time now, Oracle B2B has exposed several methods of accessing it's partner and message metadata from a custom application. This has been improved even further with B2B 12c.
In this post I'll guide you through the 2 most common ways of accessing B2B's metadata programmatically and some news of the 12c version.
The 2 main ways of accessing the metadata stored in B2B are:
Web Services exposed by B2B
In this post I'll guide you through the 2 most common ways of accessing B2B's metadata programmatically and some news of the 12c version.
The 2 main ways of accessing the metadata stored in B2B are:
- Web Services exposed by B2B
- Java API
Web Services exposed by B2B
You can access the WSDL's for the available web services at the following URL:
http://host_name:port_number/b2b/services/
The most common services are:
- Outbound Web Service - Works as an internal Listening Channel. Based on the details and headers in the soap:body, the agreement identification is done and the message is routed to the partner.
- Translation Web Service - Allows to translate documents such as EDI and HL7 from Native to XML format (NativeToXMLService) and from XML to Native format (XMLToNativeService)
- Query API (GetTPAConfigService) - Allows for retrieval of different metadata such as active agreements for a Trading Partner or checking if a Trading Partner has an agreement for a specific Document.
Using the Oracle B2B Web Services
Java API
Using the Java API you have a range of choices for different metadata information that you can retrieve from B2B.
The new Partner Metadata API (oracle.tip.b2b.utility.MetadataUtil) provides you access to Trading Partner metadata such as:
- Contact Information - This method returns a Key-Value pair (Map) of Contact Information Type and its Value/s for a given Trading Partner. If a Contact Information Type has multiple values, retrieved map will contain the whole list of values. Individual values can be extracted by iterating through this map.
public Map<String, List<String>> getContactInfo(String tpName) - Trading Partner Identifiers - This method returns a Key-Value pair (Map) of Identifier Type and its Value/s for a given Trading Partner. If an Identifier Type has multiple values, retrieved map will contain the whole list of values. Individual values can be extracted by iterating through this map. If provided TP name is nonexistent, an exception will be thrown with message: “Trading Partner does not exist”.
public Map<String, List<String>> getIdentifiers(String tpName) - Trading Partner Parameters - This method returns a Key-Value pair (Map) of Parameter Name and its Value for a given Trading Partner. Individual values can be extracted by iterating through this map. If provided TP name is nonexistent, an exception will be thrown with message: “Trading Partner does not exist”
public Map<String, String> getTradingPartnerParameters(String tpName)
There was already available other metadata APIs such as the Instance Message API which provides multiple ways to access an Instance Messages and it's associated metadate. For more information on this API as well as other APIs available on Oracle Fusion Middleware take a look at:
Note: The new Partner Metadata API and other 12c features are available for the 11g version of SOA Suite by installation of patch SOA bundle Patch 19190139 11.1.1.7.5