This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't understand the follow citation in pag. 51 of Watsh Rajneesh notes in SCDJWS links.
"If you need to import an XML schema element, you should do so in the XML schema definition contained in the WSDL types element, using the standard XML schema import statement. You cannot use the XML schema import statement to import an XML schema directly from the types element of some other WSDL document."
The first sentence is ambiguos with the next. Can somebody help me? Thanks
Team Leader<br />SCJP, SCBCD , SCDJWS, Oracle WebLogic, IBM WebSphere e IBM FileNet Certified<br /> <br /><a href="http://www.marcolombardo.it" target="_blank" rel="nofollow">http://www.marcolombardo.it</a>
I can understand your confusion but here's my clarification:
Statement 1 states that you can use xml schema import statement to import an xml schema definition to be used in WSDL types element.
Statement 2 states that in the above mentioned (Statement 1's use of xml schema import) you cannot import an xml schema definition from types element of some other WSDL document that is to say, the xml schema definition import has to come from some other xml schema file (.xsd) and not another .wsdl file's types element (where you could have defined some xml schema simple/complex type).
Also excerpts from the WSI-BP 1.0 document: (See this).
5.1.2 WSDL and Schema Import
Some examples in WSDL 1.1 incorrectly show the WSDL import statement being used to import XML Schema definitions. The Profile clarifies use of the import mechanisms to keep them consistent and confined to their respective domains. Imported schema documents are also constrained by XML version and encoding requirements consistent to those of the importing WSDL documents.
R2001 A DESCRIPTION MUST only use the WSDL "import" statement to import another WSDL description.
R2002 To import XML Schema Definitions, a DESCRIPTION MUST use the XML Schema "import" statement.
R2003 A DESCRIPTION MUST use the XML Schema "import" statement only within the xsd:schema element of the types section.
R2004 A DESCRIPTION MUST NOT use the XML Schema "import" statement to import a Schema from any document whose root element is not "schema" from the namespace "http://www.w3.org/2001/XMLSchema". This is exactly what the second statement means in my notes. The xml schema import statement can only import from another XSD and should NOT import type definitions from another WSDL's type element.
I hope now it should be clear . [ October 20, 2006: Message edited by: Watsh Rajneesh ]