Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in WSDL import element

 
Divya Gehlot
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.
 
Praveen Babu
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.
 
Peer Reynders
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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic