CSC513 Project 2: XML Validation Using Datapower
Announcement
No announcement right now
Introduction
For this assignment, you need to define a XML representation of a shopping order data, and its corresponding schema. Then you need to validate your XML file against the schema using DOMEcho and Datapower. The goal of this project is to get you familiar with XML schema and XML validation function of Datapower. This project should be finished upon the image called CSC513_compendium upon VCL.
Requirement
XML
- The XML representation should contain order id, description, submission date, shipping address and products.
- Each product should contain product id, product name, description, quantities and price.
Constraints on XML elements:
- There is exactly one date and one shipping address per order
- There is at least one product per order
- Each product has a quantity of at least one and a nonnegative price
XML schema
- A XML schema that specifies the elements in the above XML representation
Validation using DOMEcho
- You are required use DOMEcho validator to validate your XML and schema. Command to run: java DOMEcho -xsdss P3.xsd P3.xml
Validation using Datapower
- You are required use Datapower to validate your XML. There is a java project installed named PostXML which is used to send XML files to any specific IP address.
Appendix: Configure Datapower to validate XML
- Use/adjust java program (provided at CSC513_compendium) to send XML to datapower endpoint
- Configure Datapower with schema in the following steps so that it can validate incoming XMLs
- edit policy by clicking edit "Multi-Protocol Gateway Policy", you will get the screen below
- drag action icon "validate" onto line
- double-click on action "validate" and get to the screen
- set input to "INPUT"
- check "Validate Document via Schema URL"
- upload your schema by clicking "Upload"
- click "done" and all the incoming messages will be validated against the schema you just uploaded
Deliverable
- submit your XML request file and XML schema to course locker
- leave your correctly configured "Multi-Protocol Gateway" policy at Datapower
Grading
- XML schema can correctly validate the incoming XML messages (100 pts)
Reference