To get the tutorial running you have to change in samples/utils/StockQuoteService in the StockQuoteService.bpel in bpelx:exec name="validate" the Element to oracle.xml.parser.v2.XMLElement:
String symbol = ((oracle.xml.parser.v2.XMLElement)
getVariableData("input", "symbol","/symbol"))
.getFirstChild().getNodeValue();
Here a screenshot of the original code and the changes made visible with the history feature of Jdeveloper:

In the StockQuoteService you have to change the build.properties to your port and password:
#admin.user = oc4jadminTo deploy the StockQuoteService and the SyncQuoteConsumer you only have to run ant on the SyncQuoteConsumer build.xml because in this file the following is defined:
admin.password = mysecret
# http.hostname and http.port should point to BPEL Server's host and http port
#http.hostname = localhost
http.port = 7777
and the pre-build.xml just says:
<target name="deploy" depends="pre-build, process-deploy, post-build" />
<?xml version="1.0"?/>and so both BPEL projects are deployed with one ant run.
<project name="bpel.pre-build" default="pre-build" basedir="."/>
<target name="StockQuoteService"/>
<ant dir="../../utils/StockQuoteService"//>
</target/>
<target name="pre-build" depends="StockQuoteService"//>
</project/>
To add a PartnerLink to a BPEL project follow this documentation.
The service explorer window should show the following (this works only after the deployment of the StockQuoteService!):

Your PartnerLink has to look like:

To see that everything was done right, you can run the SyncQuoteConsumer with this message:
and you will get the stock quote for Oracle....
<symbol xmlns="http://samples.otn.com">ORCL</symbol>
One good thing of synchronous invocations: You need no correlation sets and it is very easy, but if the called instance needs more than 45s, you will get an ORABPEL-05002 error. You can learn avoiding it on my posting two months ago.
No comments:
Post a Comment