• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Doubt in WSDL import element

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any explain me the controversial statement
It's important to note that you
cannot use the XML schema import statement to import an XML schema directly from the
types element of some other WSDL document.(BP1.0)




In RMH book at one point he said that we cant use import statement XML schema import statement to import an XML schema directly from the
types element of some other WSDL document but still he used.
Can any one explain why so?
or I am misunderstood with the statement.
Please help me.
Thanks in advance.
 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Basic Profile says:

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".

I am not sure why RMH has said it the other way.
 
Divya Gehlot
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It means the example in RMH is not correct.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • The XML Schema <import> is used inside the XML Schema <schema> element which resides inside the WSDL <types> element.
  • The XML Schema <import> refers to a plain XML schema file po.xsd (p.41-75) - not a WSDL.


  • So the example is valid.

    The quote (p.137) simply states that you cannot use the schema elements defined directly in one WSDL's <types> section in another WSDL through the use of an XML Schema import. If you need the schema in two WSDLs then the common schema needs to be factored out as a separate XML Schema file - then you can simply import (or "include" if they belong to your targetNamespace) the Schema into both of them.
     
    Whatever. Here's a tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
      Bookmark Topic Watch Topic
    • New Topic