WADL support for ultraESB
- 4. .wadl at web service side
<application xmlns="http://wadl.dev.java.net/2009/02">
<doc xmlns:jersey="http://jersey.java.net/" jersey:generatedBy="Jersey: 1.12
02/15/2012 05:30 PM"/>
<grammars/>
<resources base="http://localhost:9000/rest-services">
<resource path="/download">
<method id="downloadFile" name="GET">
…
<resource path="/customers">
<method id="createCustomer" name="POST">
…
</method>
</resource>
</resource>
</resources>
</application>
- 5. .wadl returned to the client
<?xml version="1.0" encoding="UTF-8"?><application
xmlns="http://wadl.dev.java.net/2009/02">
<doc xmlns:jersey="http://jersey.java.net/" jersey:generatedBy="Jersey: 1.12 02/15/2012
05:30 PM"/>
<grammars/>
<resources base="http://localhost:8280/service/rest-proxy">
<resource path="/download">
<method id="downloadFile" name="GET">
…
<resource path="/customers">
<method id="createCustomer" name="POST">
…
</method>
</resource>
</resource>
</resources>
</application>
resourcePrefix + servicePath
- 6. <rest-proxy>
< <u:property value=.wadl file
location >
<u:inDestination>
<u:address
type="prefix">http://localhost:900
0/rest-services
</u:address>
2 .Filte uri=
http://.../rest-proxy.wadl
4. switchBaseLocation()
ServiceResourceRequestFilter
Service(:9000)
1. Request for .wadl
http://localhost:8280/servic
e/rest-proxy.wadl
3. Read .wadl document
5. Return .wadl as a string
Editor's Notes
- Instead of directly taking wadl from back-end service ESB Mediate the request.