Cory, WS-I's take on multiple schemas...  Looks like they mandate that
you import it.

-----Original Message-----
From: Anish Karmarkar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 4:25 PM
To: Graeme Riddell
Cc: '[EMAIL PROTECTED]'
Subject: [wsi_wsbasic_apps] Re: Multiple embedded schemas interop
confusion


Graeme,

The schema fragment for targetNamespace http://www.x.com/first is not 
legal. Schema requires that any QName reference must be either from the 
targetNamespace or must be imported.

In the example in your email, the namespace http://www.x.com/second must

be imported in the 1st <schema> element.

BP 1.0 refers to this XML schema requirement in section 5.2.1:

"XML Schema requires each QName reference to use either the target 
namespace, or an imported namespace (one marked explicitly with an 
xsd:import element). QName references to namespaces represented only by 
nested imports are not allowed."


HTH.

-Anish
--

Graeme Riddell wrote:
> All,
> 
> I've encountered a situation that we did not (I don't think) clarify 
> in BP 1.0 and would appreciate any help anyone could give. If it's as 
> ambiguous as it seems to be, perhaps we can add a recommendation in to

> BP 1.1.
> 
> It concerns multiple embedded schemas in a WSDL document, with an 
> element in one referencing an element in another via just a namespace 
> reference (impl), with no xsd:import:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://www.tempuri.com/x";
> xmlns="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
> xmlns:impl="http://www.x.com/second"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>   <wsdl:types>
>     <schema targetNamespace="http://www.x.com/first";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>       <complexType name="RateInfo">
>         <sequence>
>           <element name="displayNightlyRates"
> type="impl:ArrayOf_xsd_float"/>
>         </sequence>
>       </complexType>
> ...
>     </schema>
>     <schema targetNamespace="http://www.x.com/second";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>       <complexType name="ArrayOf_xsd_float">
>         <complexContent>
>           <restriction base="soapenc:Array">
>             <attribute ref="soapenc:arrayType"
> wsdl:arrayType="xsd:float[]"/>
>           </restriction>
>         </complexContent>
>       </complexType>
>     </schema>
>   </wsdl:types>
> 
> I know the soapenc: stuff was outlawed, but ignoring that for now, the

> problem I encounter is that I won't successfully parse the first 
> schema without an xsd:import for the other schema. I've found that 
> some other implementations do figure out that there's another embedded

> schema with a matching namespace/targetNamespace, and so do some kind 
> of implicit import.
> 
> The only thing I've found (in WSDL 1.2) is a suggestion that the 
> embedded schemas should be valid standalone schemas, suggesting that 
> the first schema above needs to have an import in it:
> 
> "3.1.2: It may be viewed as simply cutting and pasting an existing, 
> stand-alone schema, to a location inside the types element information

> item."
> 
> Has anyone else encountered this, or maybe WS-I BP 1.1 can come up 
> with a recommendation?
> 
> -thanks in advance,
> Graeme.
> 
> 
> 


Reply via email to