Code Sample 5

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://research.sun.com/wadl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="urn:PurchaseOrderDocument" xmlns:ns2="urn:Status" xmlns:ns3="urn:POProcessingFault">
    <grammars>
        <include href="POProcessingProblem.xsd"/>
        <include href="PurchaseOrder.xsd"/>
        <include href="PurchaseOrderStatus.xsd"/>
    </grammars>
    <resources base="http://127.0.0.1:8080/restfulwebservice-war/poservice">
        <resource uri="acceptPO">
            <method href="#POSTacceptPO"/>
            <method href="#GETacceptPO"/>
        </resource>
        <resource>
            <path_variable name="orderID" type="xsd:string"/>
            <method href="#retrievePO"/>
        </resource>
        <resource>
            <method href="#updatePO"/>
        </resource>
        <resource>
            <path_variable name="orderID" type="xsd:string"/>
            <method href="#cancelPO"/>
        </resource>
    </resources> 
    <method id="POSTacceptPO" name="POST" href="http://127.0.0.1:8080/restfulwebservice-war/poservice">
        <request>
            <representation element="ns1:PurchaseOrderDocument " mediaType="text/xml"/> 
        </request>
        <response>
            <representation element="ns2:Status" mediaType="text/xml"/>
         </response>
    </method>
    <method id="GETacceptPO" name="GET" href="http://127.0.0.1:8080/restfulwebservice-war/poservice">
        <request>
           <representation element="ns1:PurchaseOrderDocument " mediaType="text/xml"/>
        </request>
        <response>
            <representation element="ns2:Status" mediaType="text/xml"/>
        </response>
    </method> 
    <method id="retrievePO " name="GET" href="http://127.0.0.1:8080/restfulwebservice-war/poservice">
        <response>
            <representation element="ns1:PurchaseOrderDocument " mediaType="text/xml"/>
            <fault id="POProcessingFault" status="400" mediaType="text/xml" element="ns3:POProcessingFault"/>
        </response>
    </method>
    <method id="updatePO " name="PUT" href="http://127.0.0.1:8080/restfulwebservice-war/poservice">
        <request>
             <representation element="ns1:PurchaseOrderDocument " mediaType="text/xml"/>
        </request>
        <response>
             <representation element="ns1:PurchaseOrderDocument " mediaType="text/xml"/>
        </response>
    </method>
    <method id="cancelPO" name="DELETE" href="http://127.0.0.1:8080/restfulwebservice-war/poservice"/>
</application>