Sunday, 6 July 2014

Using XAI Inbound Service for Service Script debugging in OUAF

Many a times in OUAF framework products, we have to create our own custom scripts. Since OUAF framework does do not offer an inbuilt testing/debugging option for scripts, we have to go through some round about way for achieving the same. Lets explore how to do the same for a service script.

One of the options for achieving the same in using XAI Inbound Service which is available as part of OUAF. Using this you can test your service script for various input options and verify the output for each.

Lets take up a sample service script which takes two numbers as inputs and gives their sum back as output.

Below is the script schema:

Following is the script code. As seen it takes the two inputs sums it up and sets the sum in the output field.


Now lets create a XAI Inbound Service For this service script.
Go to Admin Menu - X - XAI Inbound Service. Click on + sign.



 XAI Inbound Service screen opens up. Enter a name for the service. 



 Select the Adapter as Business Adaptor






  Select schema type as Service Script.


 Select the service script name for testing. In this case it is CM-TestSS


 Select the transaction type as Read.


Click on Save link at the top right of screen to save the service. As seen below the WSDL url for the Webservice is also available.


To register the XAI inbound service. Go to XAI Command.
Admin Menu - X - XAI Command


XAI command screen opens up.
On the screen select Refresh Registry from the Command Dropdown.
Then click on the Send Command button.


 As seen below the command is executed successfully and the registry is refreshed.


 To confirm that your inbound service is registered you can select Display Registry command and execute it. As seen below the service CM-TestSS is registered and visible.


Now to test the XAI inbound service. Go to XAI submission.
Admin Menu - X - XAI submission


The XAI submission screen opens up. Put your request xml for the service in the the XML request box.

The xml request format is as follows:
First tag should be the name of the XAI inbound service. In our case it was CM-TestSS. So the outermost tag will be <CM-TestSS>

The inner tags should replicate the tags present in the service script schema.
The script schema is
<schema>
    <input1/> 
    <input2/> 
    <output/>
</schema>

Since we require only the input tags, the final request will be as below

<CM-TestSS>                             (XAI inbound Service name)
   <input1>1</input1>                 (Tags from service script schema)
   <input2>2</input2>
                
</CM-TestSS>



 Paste the XML request. And click on the Save Link on top right corner.


The XML request gets executed and the response is visible in the response tab.
As seen we got the sum of the two input numbers in the output tag.
So as seen we were able to test/execute our test service script using XAI inbound service.


 Now we can use the same XAI inbound service for testing out different inputs, by just changing the values being passed in the request xml. Lets change the inputs to 3 and 4.

<CM-TestSS>
   <input1>3</input1>
   <input2>4</input2>
</CM-TestSS>


As seen the output response for the above request is 7.


 Similarly we can use an XAI inbound service to test out any Service Script for any combination of inputs as per our requirement.


Using the WSDL Url present on the XAI Inbound Service screen, we can also create automated Web Service test scripts by passing the Url to a Web service testing application like SOAP UI.

OUAF Oracle Utilities WAM / ODM 2.4.0.0 installation on Windows

  This blog is for anyone looking to install Oracle Utilities WAM or ODM 2.4.0.0 (Oracle Utilities Workflow and Asset Management) or (Orac...