[英]Understanding wadl file of rest service
I've searched around but I don't really know how to interpret the wadl file of the rest service I have to use. 我到处搜索,但我真的不知道如何解释必须使用的其余服务的wadl文件。 (wadl included at bottom..)
(在底部包括wadl。)
Like I thought simple GET request like this should work: 就像我认为这样的简单GET请求应该起作用:
http://<IP HERE>:8080/RestZone-it/resources/be.zonit.rest.data?plaats=<SOME LOCATION>
(Dutch -> English) plaats = location (荷兰语->英语))=位置
But it doesn't work, I still get all the data.. Could someone explain how to use the service? 但这不起作用,我仍然可以获得所有数据。有人可以解释如何使用该服务吗? (A bit more then simply telling me how to do this single request would be appreciated ^^ )
(再简单地告诉我如何执行此单个请求将不胜感激^^)
<application xmlns="http://research.sun.com/wadl/2006/10">
<doc xmlns:jersey="http://jersey.java.net/" jersey:generatedBy="Jersey: 1.8 06/24/2011 12:17 PM"/>
<resources base="http://<IP-HERE>:8080/RestZone-it/resources/">
<resource path="be.zonit.rest.data">
<method id="create" name="POST">
<request>
<representation mediaType="application/xml"/>
<representation mediaType="application/json"/>
</request>
</method>
<method id="findAll" name="GET">
<response>
<representation mediaType="application/xml"/>
<representation mediaType="application/json"/>
</response>
</method>
<method id="edit" name="PUT">
<request>
<representation mediaType="application/xml"/>
<representation mediaType="application/json"/>
</request>
</method>
<resource path="{id}">
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="id" style="template" type="xs:int"/>
<method id="find" name="GET">
<response>
<representation mediaType="application/xml"/>
<representation mediaType="application/json"/>
</response>
</method>
<method id="remove" name="DELETE"/>
</resource>
<resource path="count">
<method id="countREST" name="GET">
<response>
<representation mediaType="text/plain"/>
</response>
</method>
</resource>
<resource path="{from}/{to}">
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="to" style="template" type="xs:int"/>
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="from" style="template" type="xs:int"/>
<method id="findRange" name="GET">
<response>
<representation mediaType="application/xml"/>
<representation mediaType="application/json"/>
</response>
</method>
</resource>
</resource>
</resources>
</application>
Example of response 回应范例
<data>
<aantalDeelnemers>50</aantalDeelnemers>
<begin>15:30</begin>
<datum>5/07/2012</datum>
<einde>1:00</einde>
<gemeente>Gent</gemeente>
<huisnr>2</huisnr>
<id>1</id>
<indoor>0</indoor>
<omschrijving>
Gent Jazz Festival vindt dit jaar plaats van 5 t.e.m. 14 juli in de tuinen van De Bijloke in Gent.
</omschrijving>
<ownerID>1</ownerID>
<plaats>Bijlokesite</plaats>
<straat>Godshuizenlaan</straat>
<titel>Gent Jazz Festival</titel>
</data>
试试这个网址:
http://<IP HERE>:8080/RestZone-it/resources/be.zonit.rest.data/<SOME LOCATION>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.