Hi Jervis
Perhaps it might be better :
<Customers>
<Customer
href="http://localhost/customerservice/customers/john">John</Customer>
<!- etc -!>
</Customers>
or
<Customers>
<Customer href="john">John</Customer>
<!- etc -!>
</Customers>
followed by a complete state retrieved through /customer/john...
The resource uri it's not really well located inside a customer value space,
it's a metadata bit...
Relative URIs are also easier to handle for a provider, it just puts there a
well known key or something...
On the client side this relative URI should be composed with the the original
URI, so if we have
http://localhost/customerservice/customers retruieving a list of customers then
the next URI would be
http://localhost/customerservice/customers + Customers/[EMAIL PROTECTED]
By the way, I'd recommend 'href' attribute be in a XLink [1] namespace :
<Customer xlink:href="john">John</Customer>
Cheers, Sergey
[1] http://www.w3.org/TR/xlink/
Using JAX-WS provider approach proposed, this is done by server side provider implementation. For example, given an URL of
http://localhost/customerservice/customers, provider impl should return an xml document like below:
<Customers>
<Customer>http://localhost/customerservice/customer/john</Customer>
<Customer>http://localhost/customerservice/customer/eric</Customer>
<Customer>http://localhost/customerservice/customer/tony</Customer>
</Customers>
On the receiving of this xml on client side, client can navigate to customer john by requesting URI
http://localhost/customerservice/customer/john, this in turn will return an xml document :
<Customer>
<CustomerName>John</CustomerName>
<CustomerID>ABC</CustomerID>
</Customer>