Monday, June 21, 2010

Expose Dictionaries as Composite Service

I had the discussed cases where decision services were exposed as web services, that could be consumed by BPEL or a Java Client. The dictionary itself, can be exposed as a Composite Service by checking the option as shown below, meaning, you do not need a BPEL to invoke the rules and the consumer can directly pass the payload to the decision service/dictionary and get the output.















I worked on such a case, and I had some issues in hitting the Composite Service. Once the project has been developed and deployed, you can use any web service testing tool to test it. I used SoapUI in this case. I imported the WSDL, created a request and hit the web service using the option of "callFunctionStateless" (the SoapUI created two methods - callFunctionStateless and callFunctionStateful). I got an error as below:


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <env:Fault xmlns:fpre="http://xmlns.oracle.com/bpel/rules">
         <faultcode>fpre:operationErroredFault</faultcode>
         <faultstring/>
         <faultactor/>
         <detail>
            <errorInfo xmlns="http://xmlns.oracle.com/bpel/rules">
               <errorMessage>RulesWithoutBPEL</errorMessage>
            </errorInfo>
         </detail>
      </env:Fault>
   </env:Body>
</env:Envelope>

I then realized that under the soap:Body, there is a method by name <orac:callFunctionStateless name="">. In the attribute, the name of the decision service which has been exposed as web service should be given. It worked after that !


Peace!

Cheers,
-AR

No comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License