...
Code Block | ||
---|---|---|
| ||
<api name="StarbucksService" context="/Starbucks_Service">
<resource methods="POST" url-mapping="/orders/add">
<inSequence>
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
<send>
<endpoint>
<address uri="http://localhost:9764/StarbucksService/services/Starbucks_Outlet_Service/orders/"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<property name="messageType" value="application/xml" scope="axis2"/>
<send/>
</outSequence>
</resource>
<resource methods="PUT" url-mapping="/orders/edit">
<inSequence>
<log level="full"/>
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
<property name="messageType" value="application/json" scope="axis2"/>
<property name="ContentType" value="application/json" scope="axis2"/>
<send>
<endpoint>
<address uri="http://localhost:9764/StarbucksService/services/Starbucks_Outlet_Service/orders/"
format="rest"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<property name="messageType" value="application/xml" scope="axis2"/>
<send/>
</outSequence>
</resource>
<resource methods="DELETE GET" uri-template="/orders/{id}">
<inSequence>
<property name="REST_URL_POSTFIX"
expression="fn:concat('/orders/',get-property('uri.var.id'))"
scope="axis2"/>
<send>
<endpoint>
<address uri="http://localhost:9764/StarbucksService/services/Starbucks_Outlet_Service/"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<property name="messageType" value="application/xml" scope="axis2"/>
<send/>
</outSequence>
</resource>
</api> |
...