Tuesday 31 May 2016

Xquery in SOA Suite 12C


XQuery in SOA Suite 12c. 


We are going to take Xquery in the SOA suite 12C. Right now, there are many blogs which tells you difference between the Xquery and Xlst. Xlst engine is available with SOA but xquery is a new entrant to Oracle SOA with 12C.

We are first trying to set the difference between the xlst and xquery.  
Context XSLT Xquery
Logic Xslt is a data driven technology, It transforms one form of data into another but its a data based transformation.  Xquery is also used for transformation but it mostly logic  based transformation.
Datausing Xslt make more sense when we need to transform almost all the data from one form to
another.
Xquery not normally give any additional advantage when transformation is just of structure. But when its required to pick up
any specific data then it gives us additional benefit.




In some of the post users have told that performance of both the transformation technique is much different in different environment, but when it comes to weblogic and for doing the bulk data process both are same, we are in this example using xquery to perform some logic.  
  


   There is nothing as such good or bad in both the technology, but yes there are different pros and cons of using it.  Please download the application from the url and run it from the xml given in the test suite folder.

This application is a simple application, which accept multiple employees and provide the max and sum of all the salaries.

We have shown both the ways to do this activity, first is the Xquery and second is xlst.  In some post i have seen that xquery was part of SOA 11g, But during my work I have not seen it, it was part of OSB but not the BPEL.


   Xquery : -  Its again an componet, for which reference goes in the BPEL file, Xquery file is created as a part of your BPEL process. One thing we should remember, reference files normally be executed in there separate engines.


               


  A number of options you can see which you can use in the xquery.  These options anyway more then the xlst.








Application :-

     Open the application in the jdeveloper 12c and deploy it, use our previous post if you are not sure how deploy a soa composite.







   One Application is deployed, we can execute is using the EM console or SOAP UI. 


 Execution:- 
     
    1. Open the instance and see the flow of the application it will look like below.
     


        

2.  This is what xquery, has processed.













This example is for the basic of xquery, but you can play with example to get some advance feature.



Reference:

http://www.xml.com/pub/a/2005/03/09/xquery-v-xslt.html

No comments:

Post a Comment