Two Laptop Bag*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Watsh Rajneesh notes mistake??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Watsh Rajneesh notes mistake???" Watch "Watsh Rajneesh notes mistake???" New topic
Author

Watsh Rajneesh notes mistake???

Marco Lombardo
Ranch Hand

Joined: Jul 05, 2005
Posts: 71
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>
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
I think the second sentence should read:
"You cannot use the WSDL schema import statement to import an XML schema directly from the types element of some other WSDL document."


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Watsh Rajneesh
Ranch Hand

Joined: Apr 17, 2006
Posts: 110
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 ]

SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Here is an example that further illustrates Watsh's point:

LEGAL



NOT LEGAL


[ October 24, 2006: Message edited by: Valentin Crettaz ]
[ October 24, 2006: Message edited by: Valentin Crettaz ]
Watsh Rajneesh
Ranch Hand

Joined: Apr 17, 2006
Posts: 110
Thank you Val for the illustrative example.
 
jQuery in Action, 2nd edition
 
subject: Watsh Rajneesh notes mistake???
 
Similar Threads
please help to explain this sentence in the book of MH
XML/WSDL imports
Cleared with 85%
Doubt about import statement in RMH
Question about importing XML Schema in WSDL