W3C home > Mailing lists > Public > www-ws-desc@w3.org > June 2003

RE: targetResource wording

From: David Booth <dbooth@w3.org>
Date: Fri, 20 Jun 2003 16:47:23 -0400
Message-Id: <>
To: "Savas Parastatidis" <Savas.Parastatidis@newcastle.ac.uk>, <www-ws-desc@w3.org>


The targetResource is intended to help in discovery or selection of an 
appropriate service.  It is not intended to help in client or service code 
generation, nor is it intended to help ensure that the client and service 
agree on the interaction that they will have.

I don't think the example you showed reflects the way the targetResource 
was intended to be used.

Imagine you have 3000 printer services, and 5000 management services.  You 
wish to print a document to the printer nearest to your office, but you 
first want to use its management service to find out how much ink is left 
in its toner cartridge.  Your office mate, before leaving for vacation, 
told you that Web service PrinterService428 will print to that printer, but 
she didn't tell you which management service controls it.  You have a 
directory of all of the Web service descriptions (WSDs) for all of your 
management services.  How do you know which is the one that controls the 
printer you wish to use?  The targetResource can help you.  Here's how.

Let's suppose all of the printer service descriptions use the same 


and all of the management service descriptions use the same targetNamespace:


(BTW, don't confuse "targetNamespace" with "targetResource".  They're 
totally different.)

The WSDL 1.2 Web service description (WSD) of PrinterService428 says:

<definitions targetNamespace="http://example.com/Printer_NS_Semantics.html" 
   <interface name="PrintInterface">
     <operation name="PrintDocument">
   <service name="PrinterService428"

The WSD of ManagementService3456 says:

targetNamespace="http://example.com/Management_NS_Semantics.rdf" ...>
   <interface name="PrinterManagementInterface">
     <operation name="ManagePrinter">
   <service name="ManagementService3456"

Here's what you do.

1. First, you need to know the semantics of the WSD of 
PrinterService428.  Fortunately, there SHOULD be a human or machine 
readable document at the end of the WSD's targetNamespace[1], defining its 
semantics.  So you look at http://example.com/Printer_NS_Semantics.html and 
find that for services described using this namespace:

         a. the "PrintInterface" interface is the one to use to print a
         document; and

         b. the targetResource attribute identifies the physical printer
         that is manipulated when you send requests to a "PrintInterface".

Good.  (Of course, if there isn't a document at the end of the 
targetNamespace, then you're on your own to figure out the semantics of 
that WSD.  Perhaps you can guess, or perhaps you can find some other 
document, in a non-standard location, that (you hope) correctly describes 
the semantics.)

2. Next, you need to confirm that the printer management services also use 
the targetResource attribute in the same way.  So you look at 
http://example.com/Management_NS_Semantics.rdf and learn that for services 
described using this namespace:

         a. the "PrinterManagementInterface" is used to check the toner
         level; and

         b. the targetResource attribute identifies the physical printer
         that is manipulated when you send requests to a

Excellent.  That's what you wanted.

3. Next, you look up the value of the targetResource attribute in the WSD 
of PrinterService428 and find:


4. Finally, you simply search your directory of WSDs for a service having
         <interface name="PrinterManagementInterface">

The WSD that matches your search should be the WSD of the management 
service corresponding to PrinterService428.


David Booth
W3C Fellow / Hewlett-Packard
Telephone: +1.617.253.1273
Received on Friday, 20 June 2003 16:47:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:06:30 UTC