A web service illustrating how you can use an XQuery map on a method whose parameter values are arrays.
The method in this web service accepts three arrays as parameters and returns a simple float. In order to map to the set of arrays, the XQuery map loops through the incoming XML message, extracting values and inserting them into the template represented by the map.
In general, you may find that while the XQuery expression in the source code looks complex, it resembles programming conventions with which you're already familiar, such as variables, loops, and return values.
Here are a few things to note about the XQuery in this sample's maps:
The return-xml XQuery map includes a simple path expression that finds the result of the method and inserts it into the template for the outgoing message.
This sample is located in the xqueryMap folder of the SamplesApp WebLogic Workshop project. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\xqueryMap\InputMapMultiple.jws
To Run the Sample
BEA_HOME/weblogic81/samples/domains/workshop/startWebLogic.sh
How Do I: Add or Edit an XQuery Map with the XQuery Mapper Dialog?