users@wadl.java.net

Introduction and First Question: Modeling separate resource groups for HTTP & HTTPS

From: Don Song <don_at_itcloud.com>
Date: Thu, 29 May 2008 11:13:07 -0700

Hello, first a brief introduction. I'm the founder and chief
developer/architect of a company developing a web-based IT asset management
system which exposes a REST based web service interface.

I initially defined my interface using a custom ad-hoc XML schema but
recently discovered WADL (thanks to the O'reilly book on RESTful web
services) and found that it was very similar to what I've been doing. So
I've started to migrate my interface definitions to WADL to better align my
work with common standards and terminology. I am more interested in the
WADL standard and not on the java libraries, since my product is based on
.NET (C#). I have written a basic WADL object model/parser in .NET (C#)
which is not complete but suits my immediate needs.
Anyway, on to my first question:

I have a set of resources that need to be secured using HTTPS and another
set which does not. I have not found a good way to model this in a single
WADL document, given my current understanding of the spec.

The simplest approach I could think of was to have to multiple resources
elements, like so:

<resources base="https://example.com">
    <doc>secured interface</doc>
    ...
</resources>

<resources base="http://example.com>
    <doc>unsecured interface</doc>
    ...
</resources>

However, it seems the current XML schema (dated 2006/10) only allows one
resources element in a document.
Then I thought I could use resource_type element for each group, but this
element is used to model a single resource, not a group of resources.

Am I missing something here? Is there some elegant/canonical way to handle
this?

Regards,
Don