Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it a valid <include> for a WSDL

 
Kamal Tripathi
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider the following WSDL. I have trimmed it to keep only wsdl:types and other relevant details. I removed the message, operation and other elements to keep it short. Some XSDs are imported but they are present online so you can take a look at them too.

So here are my questions.

1. Is it a valid include since in first include http://soabook.com/example/oms/orders.xsd has targetNamespace="http://www.example.com/oms" and the WSDL's targetNamespace="http://www.example.com/req". Same is the case with second include as well.
2. I checked this WSDL is working fine with wsimport tool so wondering, how is the targetNamespace="http://www.example.com/oms" being referenced here. Is it because of the enclose <xs:schema> element which defined targetNamespace is also importing it?

 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kamal,

Please keep in mind that Basic Profile Version 1.1 says -

R2001 A DESCRIPTION MUST only use the WSDL "import" statement to import another WSDL description.


Regards,
Dan
 
Bob Nedwor
hangman
Ranch Hand
Posts: 215
Eclipse IDE Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. Is it a valid include since in first include http://soabook.com/example/oms/orders.xsd has targetNamespace="http://www.example.com/oms" and the WSDL's targetNamespace="http://www.example.com/req". Same is the case with second include as well.

This is valid. You are using xs:include and xs:import (as they are defined in http://www.w3.org/2001/XMLSchema).
The example is NOT using the WSDL version of import. So I do not understand the nature of the first response.
The example comes from Mark Hansen's Great book, www.soabook.com, so as long as you did not alter it, you can bet it is valid.

2. I checked this WSDL is working fine with wsimport tool so wondering, how is the targetNamespace="http://www.example.com/oms" being referenced here. Is it because of the enclose <xs:schema> element which defined targetNamespace is also importing it?

This is a good question. I am not certain, but it looks like you are right. It appears that a new <schema> enclosure requires us to
import the namespace, even though xmlnsms="http://www.example.com/oms" is already defined up in the header of the main WSDL.

 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Nedwor wrote: The example is NOT using the WSDL version of import. So I do not understand the nature of the first response.

Sorry - I messed up.

Looking at -


It seems to be just fine. Ivan points in his study guide that the targetNamespace within http://soabook.com/example/oms/orders.xsd should point to http://www.example.com/oms as well.

Regards,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic