Learn XQuery |
Home:Learn XQuery:White Papers:ACORD:Validating Update Requests Validating Update RequestsSuppose now our system receives a message containing an address change request (tc=181 in ACORD parlance). Before even processing it, however, we want to make sure the message is semantically valid (not just valid in terms of the ACORD standards); in particular we want to ensure that:
The XQuery implementing such validation is shown here (click this link to open the XQuery document): declare namespace tx="http://ACORD.org/Standards/Life/2"; As you can see in acord_verbs.xquery, declare function example:validate-181($request as element(tx:TXLifeRequest)) as element(tx:TXLifeResponse)? { Validation of the ZIP code, when "AddressCountry" is "USA" is delegated to the example:getZipInfo() function, which in turns delegates validation to a third party public Web Service, published by http://www.webservicemart.com (http://www.webservicemart.com/uszip.asmx): declare function example:getZipInfo($zipCode as xs:string) as element()? { Thanks to the ddtek:wscall() function, invoking external Web Service from a DataDirect XQuery™ is extremely simple, as you can see. What's NextNow that you see how to use DataDirect XQuery™ to validate data, go to Updating a Relational Database to learn how to update relational data with DataDirect XQuery™. |
DataDirect XQuery FAQThis informative DataDirect XQuery® FAQ answers frequently-asked questions about DataDirect XQuery® , including questions about performance, scalability, use-cases, resources, and more. If you're more of a hands-on learner, then download a free copy and start exploring DataDirect XQuery® today! New Case StudyGevity produces sales proposals in real time using DataDirect XQuery® . See how Gevity uses DataDirect XQuery® to combine Web service data from SalesForce.com with relational data in Oracle in a pricing engine for HR management. |





