2002/ws/desc/wsdl20 wsdl20-primer.xml,1.42,1.43

Update of /sources/public/2002/ws/desc/wsdl20
In directory hutz:/tmp/cvs-serv23206

Modified Files:
	wsdl20-primer.xml 
Log Message:
Added Primer section in schemaLocation attribute.

Index: wsdl20-primer.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-primer.xml,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** wsdl20-primer.xml	29 Mar 2005 23:08:24 -0000	1.42
--- wsdl20-primer.xml	30 Mar 2005 03:18:26 -0000	1.43
***************
*** 2220,2224 ****
  						will therefore include an example that addresses
  						that topic of the thread, and an example that
! 						addresses the section title.
  					</edtext>
  				</ednote>
--- 2220,2232 ----
  						will therefore include an example that addresses
  						that topic of the thread, and an example that
! 						addresses the section title. BTW, I find the
! 						resolution of the thread to be very
! 						unsatisfactory since it doesn't nail down the
! 						expected behavior of a WSDL processor when the
! 						schemaLocation is omitted. I'd prefer the spec
! 						to say that a WSDL processor that encounters an
! 						inline schema MUST remember that fact and use it
! 						to locate the schema should it appear in an
! 						import element without a schemaLocation.
  					</edtext>
  				</ednote>
***************
*** 2263,2267 ****
  							http://greath.example.com/2004/services/retrieveDetails
  						</code>
! 						target namespace. This WSDL document also
  						contains an inline schema that describes the
  						reservation detail in the
--- 2271,2275 ----
  							http://greath.example.com/2004/services/retrieveDetails
  						</code>
! 						namespace. This WSDL document also
  						contains an inline schema that describes the
  						reservation detail in the
***************
*** 2269,2273 ****
  							http://greath.example.com/2004/schemas/reservationDetails
  						</code>
! 						target namespace. This schema is visible to the
  						<code>retrieveDetailsInterface</code>
  						interface definition which refers to it in the
--- 2277,2281 ----
  							http://greath.example.com/2004/schemas/reservationDetails
  						</code>
! 						namespace. This schema is visible to the
  						<code>retrieveDetailsInterface</code>
  						interface definition which refers to it in the
***************
*** 2335,2339 ****
  							http://greath.example.com/2004/services/updateDetails
  						</code>
! 						target namespace. The
  						<code>updateDetailsInterface</code>
  						interface extends the
--- 2343,2347 ----
  							http://greath.example.com/2004/services/updateDetails
  						</code>
! 						namespace. The
  						<code>updateDetailsInterface</code>
  						interface extends the
***************
*** 2345,2352 ****
  							http://greath.example.com/2004/services/retrieveDetails
  						</code>
! 						namespace, so the
! 						<code>updateDetails.wsdl</code>
! 						document must import the
! 						<code>retrieveDetails.wsdl</code>
  						to make that namespace visible.</p>
  					<p>
--- 2353,2358 ----
  							http://greath.example.com/2004/services/retrieveDetails
  						</code>
! 						namespace, so <code>updateDetails.wsdl</code>
! 						must import <code>retrieveDetails.wsdl</code>
  						to make that namespace visible.</p>
  					<p>
***************
*** 2377,2388 ****
  						element has been omitted. The
  						<code>schemaLocation</code>
! 						attribute is a hint to the WSDL processor of the
! 						location of the imported schema namespace.
  						However, the WSDL processor has already
  						processed the
  						<code>retrieveDetails.wsdl</code>
  						document which contains the imported namespace
! 						in an inline schema so it should not need a
! 						further hint. However, this behavior depends on
  						the implementation of the processor and so
  						cannot be relied on.
--- 2383,2394 ----
  						element has been omitted. The
  						<code>schemaLocation</code>
! 						attribute is a hint to the WSDL processor that tells it where to
! 						look for the imported schema namespace.
  						However, the WSDL processor has already
  						processed the
  						<code>retrieveDetails.wsdl</code>
  						document which contains the imported namespace
! 						in an inline schema so it should not any hints. 
! 						However, this behavior depends on
  						the implementation of the processor and so
  						cannot be relied on.
***************
*** 2392,2396 ****
  						<code>schemaLocation</code> attribute, it is a best practice to either provide a
  						reliable value for
! 						it or move the inline schema to a separate
  						document, say
  						<code>reservationDetails.xsd</code>, and directly import it in the
--- 2398,2402 ----
  						<code>schemaLocation</code> attribute, it is a best practice to either provide a
  						reliable value for
! 						it or move the inline schema into a separate
  						document, say
  						<code>reservationDetails.xsd</code>, and directly import it in the
***************
*** 2449,2453 ****
  				<div3>
  					<head>Multiple Inline Schemas on One Document</head>
! 					<p>TBD.</p>
  				</div3>
  
--- 2455,2574 ----
  				<div3>
  					<head>Multiple Inline Schemas on One Document</head>
! 					<p>
! 						A WSDL document may define multiple inline
! 						schemas in its
! 						<code>types</code>
! 						element. The two or more schemas may have the
! 						same target namespace provided that they do not
! 						define the same elements or types. It is an
! 						error to define the same element or type more
! 						than once, even if the definitions are
! 						identical.
! 					</p>
! 					<p>
! 						Each namespace of an inline schema becomes visible to the Web
! 						service definitions. However, the namespaces are
! 						not automatically visible to the other inline
! 						schemas. Each inline schema must explictly
! 						import any other namespace it references. The
! 						<code>schemaLocation</code>
! 						attribute is not required in this case since the
! 						WSDL processor knows the location of each schema
! 						by virtue of having processed the enclosing WSDL
! 						document.
! 					</p>
! 					<p>
! 						To illustrate this, consider
! 						<specref ref="retrieveItems.wsdl" />
! 						which contains two inline schemas. The
! 						<code>
! 							http://greath.example.com/2004/schemas/reservationItems
! 						</code> namespace
! 						contains some elements for items that appear in
! 						the reservation details. The
! 						<code>
! 							http://greath.example.com/2004/schemas/reservationDetails
! 						</code>
! 						namespace contains the
! 						<code>reservationDetails</code>
! 						element which refers to the item elements. The schema for the
! 						<code>
! 							http://greath.example.com/2004/schemas/reservationDetails
! 						</code>
! 						namespace contains an
! 						<code>import</code>
! 						element that imports the
! 						<code>
! 							http://greath.example.com/2004/schemas/reservationItems
! 						</code>
! 						namespace. No
! 						<code>schemaLocation</code>
! 						attribute is required for this import since the
! 						schema is defined inline in the importing
! 						document.
! 					</p>
! 
! 					<example id="retrieveItems.wsdl">
! 						<head>
! 							Multiple Inline Schemas: retrieveItems.wsdl
! 						</head>
! 						<eg><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
! <description xmlns="http://www.w3.org/2004/08/wsdl"
! 	targetNamespace="http://greath.example.com/2004/services/retrieveDetails"
! 	xmlns:tns="http://greath.example.com/2004/services/retrieveDetails"
! 	xmlns:wdetails="http://greath.example.com/2004/schemas/reservationDetails"
! 	xmlns:xs="http://www.w3.org/2001/XMLSchema">
! 
! 	<documentation>
! 		This document describes the GreatH Retrieve Reservation Details
! 		Web service.
! 	</documentation>
! 
! 	<types>
! 
! 		<xs:schema targetNamespace="http://greath.example.com/2004/schemas/reservationItems">
! 
! 			<xs:element name="confirmationNumber" type="string" />
! 			<xs:element name="checkInDate" type="date" />
! 			<xs:element name="checkOutDate" type="date" />
! 			<xs:element name="roomType" type="string" />
! 			<xs:element name="smoking" type="boolean" />
! 
! 		</xs:schema>
! 
! 		<xs:schema targetNamespace="http://greath.example.com/2004/schemas/reservationDetails"
! 			xmlns:items="http://greath.example.com/2004/schemas/reservationItems">
! 
! 			<xs:import
! 				namespace="http://greath.example.com/2004/schemas/reservationItems" />
! 
! 			<xs:element name="reservationDetails">
! 				<xs:complexType>
! 					<xs:sequence>
! 						<xs:element ref="items:confirmationNumber" />
! 						<xs:element ref="items:checkInDate" />
! 						<xs:element ref="items:checkOutDate" />
! 						<xs:element ref="items:roomType" />
! 						<xs:element ref="items:smoking" />
! 					</xs:sequence>
! 				</xs:complexType>
! 			</xs:element>
! 		</xs:schema>
! 
! 	</types>
! 
! 	<interface name="retrieveDetailsInterface">
! 
! 		<operation name="retrieve"
! 			pattern="http://www.w3.org/2004/03/wsdl/in-out">
! 			<input messageLabel="In" element="#none" />
! 			<output messageLabel="Out"
! 				element="wdetails:reservationDetails" />
! 		</operation>
! 
! 	</interface>
! 
! </description>]]></eg>
! 					</example>
  				</div3>
  
***************
*** 2455,2462 ****
  			<div2 id="adv-schema-location">
  				<head>The schemaLocation Attribute</head>
! 				<p>[ACTION: 2003-11-13: David to add discussion / example(s) re:
!                       @schemaLocation for embedded schemas to the
!                       primer.
!  See discussion in http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/0135.html and thread called "Schemas in imported WSDL" in http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/thread.html ]</p>
  			</div2>
  			
--- 2576,2690 ----
  			<div2 id="adv-schema-location">
  				<head>The schemaLocation Attribute</head>
! <ednote>
! <name>Arthur</name>
! <date>20050329</date>
! <edtext>Here is my input.</edtext>
! </ednote>
! 				<p>
! 					[ACTION: 2003-11-13: David to add discussion /
! 					example(s) re: @schemaLocation for embedded schemas
! 					to the primer. See discussion in
! 					http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/0135.html
! 					and thread called "Schemas in imported WSDL" in
! 					http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/thread.html
! 					]
! 				</p>
! 
! <p>
! In the preceeding examples, schemas were defined inline in WSDL documents. This section discusses the correct way to specify a <code>schemaLocation</code>
! attribute on a schema <code>import</code> element to provide a processor with a hint for locating these schemas.
! </p>
! <p>
! <specref ref="updateDetails.wsdl"/> shows how one WSDL document imports a schema defined in another, i.e. <specref ref="retrieveDetails.wsdl"/>.
! Similarly, <specref ref="retrieveItems.wsdl"/> shows how one schema in a WSDL document imports another schema defined in the same document.
! In both of these examples, the <code>schemaLocation</code> attribute was omitted since the WSDL processor was assumed to know how to locate the imported
! schemas because they were part of the WSDL documents being processed. The <code>schemaLocation</code> attribute can be used to give the processor a URI reference
! that explictly locates the schemas. A URI reference is a URI plus an optional fragment identifier that indicates part of the resource. For schemas, the fragment should identify
! the <code>schema</code> element. The simplest way to accomplish this is to use the <code>id</code> attribute, however XPointer can also be used.
! </p>
! 				<div3>
! 					<head>
! 						Using the id Attribute to Identify Inline
! 						Schemas
! 					</head>
! 					<p>
! 						<specref ref="schemaIds.wsdl" />
! 						shows the use of the
! 						<code>id</code>
! 						attribute. Both of the inline schemas have
! 						<code>id</code>
! 						attributes. 
! The id of the <code>http://greath.example.com/2004/schemas/reservationItems</code> schema is <code>items</code> and the id of the 
! <code>http://greath.example.com/2004/schemas/reservationDetails</code> schema is <code>details</code>.
! The
! 						<code>import</code>
! 						element in the <code>http://greath.example.com/2004/schemas/reservationDetails</code> schema uses the id of the
! 						<code>http://greath.example.com/2004/schemas/reservationItems</code> schema in the
! 						<code>schemaLocation</code>
! 						attribute, i.e. <code>#items</code>.
! 					</p>
! <example id="schemaIds.wsdl"><head>Using Ids in Inline Schemas: schemaIds.wsdl</head>
! <eg><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
! <description xmlns="http://www.w3.org/2004/08/wsdl"
! 	targetNamespace="http://greath.example.com/2004/services/retrieveDetails"
! 	xmlns:tns="http://greath.example.com/2004/services/retrieveDetails"
! 	xmlns:wdetails="http://greath.example.com/2004/schemas/reservationDetails"
! 	xmlns:xs="http://www.w3.org/2001/XMLSchema">
! 
! 	<documentation>
! 		This document describes the GreatH Retrieve Reservation Details
! 		Web service.
! 	</documentation>
! 
! 	<types>
! 
! 		<xs:schema id="items"
! 			targetNamespace="http://greath.example.com/2004/schemas/reservationItems">
! 
! 			<xs:element name="confirmationNumber" type="string" />
! 			<xs:element name="checkInDate" type="date" />
! 			<xs:element name="checkOutDate" type="date" />
! 			<xs:element name="roomType" type="string" />
! 			<xs:element name="smoking" type="boolean" />
! 
! 		</xs:schema>
! 
! 		<xs:schema id="details"
! 			targetNamespace="http://greath.example.com/2004/schemas/reservationDetails"
! 			xmlns:items="http://greath.example.com/2004/schemas/reservationItems">
! 
! 			<xs:import
! 				namespace="http://greath.example.com/2004/schemas/reservationItems"
! 				schemaLocation="#items" />
! 
! 			<xs:element name="reservationDetails">
! 				<xs:complexType>
! 					<xs:sequence>
! 						<xs:element ref="items:confirmationNumber" />
! 						<xs:element ref="items:checkInDate" />
! 						<xs:element ref="items:checkOutDate" />
! 						<xs:element ref="items:roomType" />
! 						<xs:element ref="items:smoking" />
! 					</xs:sequence>
! 				</xs:complexType>
! 			</xs:element>
! 		</xs:schema>
! 
! 	</types>
! 
! 	<interface name="retrieveDetailsInterface">
! 
! 		<operation name="retrieve"
! 			pattern="http://www.w3.org/2004/03/wsdl/in-out">
! 			<input messageLabel="In" element="#none" />
! 			<output messageLabel="Out"
! 				element="wdetails:reservationDetails" />
! 		</operation>
! 
! 	</interface>
! 
! </description>]]></eg></example>
! 
! 				</div3>
  			</div2>
  			

Received on Wednesday, 30 March 2005 03:18:29 UTC