• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt in WSDL import element

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic