One of the ways we can get data into the Active Data Cache of our BAM Server in Oracle 11g SOA Suite – is through the BAM WebServices. So instead of having BAM listen to JMS, having the BAM Adapter and BPEL Sensor actions send data to the ADC, we have this omnipresent facility that we can easily approach from virtually anywhere, including Java, PL/SQL and C#/.NET to create and update BAMs data objects.
These synchronous SOAP based services are published at http://localhost:8888/OracleBAMWS/WebServices/DataObjectOperationsByID and the WSDL can be found by adding ?WSDL to this URL. Note that the BAM WS require (plain HTTP) authentication. (this threw me a little at first).
The easiest way to get started with BAM WS is probably through the Test WebService facility. Navigate to http://host:8888/OracleBAMWS/WebServices/DataObjectOperationsByID you will find a page like this:
You have to select the desired operation – Insert in this case. Then set the input parameters:
* the identification of the Data Object, in my case /HelloWorldDO; this surprised me as the WS is called DataObjectOperationsByID and the ID of the Data Object is _HelloWorldDO.
* the XML payload that contains the actual data object content. BAM expects to find a root node in the XML payload whose name does not matter. The root should have child elements for each of the Data Object fields. The XML Payload I used in this case:
The important thing here is that the element name corresponds exactly with the Data Object fieldname.
Finally, and very importantly as otherwise you will be slapped with HTTP 401 error messages, is to provide Transport info. Here you need to provide the username – fmwadmin – and password and check the enable checkbox.
Then you are ready to hit the Invoke button. The result is something like:
In the BAM Architect application, I can quickly inspect the contents of the ADC for DataObject HellowWorldDO:
Row 8 is the DataObject created as a result from my WebService call. So it is working!
The next steps in exploring this functionality could be calling this BAM Service from the database (UTL_HTTP), from ADF applications and other places.
Article on ADF accessing secure Web Services: http://www.oracle.com/technology/products/jdev/howtos/1013/protectedws/access_protected_web_services_from_adf.htm
I had a lot of initial problems with the BAM WS. These can be traced in the following OTN Forum Thread where I was very promptly supported by Deepan and Vishal:
Forum thread on this http://forums.oracle.com/forums/thread.jspa?messageID=2503875