Hi all,
After discussing with Axis2/Java folk, I believe that we should improve
the services.xml to support RESTful Services as we don't have a WSDL2.0
mode. This is the proposed scheme.
[1]. Adding a local http_location mapping for each operation:
<operation name="foo">
<parameter name="HTTPMethod" >PUT</parameter>
<parameter name="HTTPLocation" >foo/bar/{x}/{y}</parameter>
</operation>
[2]. Specification of the default HTTPMethod for a service:
<parameter name="HTTPMethod" locked="xsd:false">GET</parameter>
[3]. This is the explanation of HTTPLocation parameter.
1. This is the trailing portion of the URL after the service name.
2. This may or may not start with the operation name.
3. This may include constant portions and variable portions.
4. Variable portions are included inside '{' '}' (curly braces).
5. Curly braces are escaped as {{ or }}.
6. Escaping of curly braces adds another limitation, being we can't
specify constant portions inside a variable portion and vice versa.
7. Separation of portions is done by '/'s.
8. HTTPLocation can include query-string portions that need 2 be matched.
9. Thus, someone can make the order of the query string parameters
significant.
10. Un-specified areas are not captured.
This is a sample RESTful services' service.xml:
<service name="sample">
<parameter name="HTTPMethod" locked="xsd:false">GET</parameter>
<description>
This is a sample service.
</description>
<operation name="foo">
<parameter name="HTTPMethod" >PUT</parameter>
<parameter name="HTTPLocation" >foo/bar/{x}/{y}</parameter>
</operation>
</service>
[4]. This is a sample request to this service
ex:- http://localhost:9090/sample/foo/bar/12/14?query
Please add your comments and suggestions.
Regards,
Senaka
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]