English 中文(简体)
Representing arbitrary hierarchies in WADL
原标题:

I am modeling a REST API and part of the API will represent resources that are organized into an arbitrary hierarchy of nodes with values and sub-nodes (kind of like a file system or the windows registry).

I would love to create a WADL file so that i can generate the JAX-RS boilerplate for the API but i m not sure how to represent such a situation in WADL.

i could just use a string as a template parameter but i m not sure how i would detect that that string parameter is allowed to have slashes in its value and generate the JAX-RS @Path annotation properly.

Is it legit to create a template parameter that is repeatable and expect that sort of functionality? e.g.

HTTP GET http://my.service.com/registry/path/to/my/node

where the repeated template params are "path", "to", "my", "node" ?

最佳回答

If you look at the current draft URI template spec there exists a template that describes what you want:

  http://my.service/com/registry{/list*}

I have no idea if any WADL tooling actually is capable of parsing all the templates that are defined in the spec yet. I don t use WADL, and don t recommend it, so I can t help you there.

问题回答

暂无回答




相关问题
IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

ASP.net web services

I am using a web service which sets the Thread.CurrentPrincipal object while logging in and soon later when another webmethod of the same web service accesses Thread.CurrentPrincipal, its different/...

Unity Container Disposing and XML Web Service

I am registering some wrapers over un-managed objects in container. How can I dispose of them at the end of the container s lifetime? Please bear in mind I have an XML Web service.

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签