[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Famous web services with apparent serious XML schema error
Hi, > I'm working on an application that needs to be able to read and rely on the > XML Schema information contained in or referenced from web service > descriptions (WSDL), since it is supposed to be able to dynamically interact > with any web service so specified. While this is possible with many web > services, it seems that developers of these descriptions sometimes propagate > a common set of what I believe to be erroneous schema constructs and usages. > The the schemas are > a. invalid > b. fail to define the types that were intended > and the instances returned from the web services are invalid with respect to > the schemas. > > The common errors (if I am not confused!) are: > > 1. Using the http://schemas.xmlsoap.org/soap/encoding/ namespace (the URL > can be dereferenced to get the schema) and referring to its types without an > <import> in the schema. The schema thus will not be accepted by a schema > validator. Yes, it's common. > 2. Definition of array types based on the soap encoding, like this: > <xsd:complexType name="AuthorArray"> > <xsd:complexContent> > <xsd:restriction base="soapenc:Array"> > <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/> > </xsd:restriction> > </xsd:complexContent> > This derivation fails to copy the unchanged content from soapenc:Array > (basically a repeating <any>), so instead of defining a homogeous array, it > specifies empty content..[1] Xerces tells me so when I hand it an instance: > This manner of "derivation" is found in the WSDL 1.1 spec. See bullet three under: http://www.w3.org/TR/wsdl#_types and look at examples such as Example 5. An often cited critique of this can be found within: http://www.capescience.com/articles/commonerrors/index.shtml This has been the cause of quite a bit of debate in the past on various lists. The consensus by implementors of WSDL processors seems to be to adopt it as given in the WSDL 1.1 spec for until something better comes along. The argument was that the definition for a SOAP encoded array wasn't to be used for validation. A typical expression of this pov is found at: http://groups.yahoo.com/group/soapbuilders/message/5855 RC
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|