aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Is it a valid <include> for a WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Is it a valid <include> for a WSDL" Watch "Is it a valid <include> for a WSDL" New topic
Author

Is it a valid <include> for a WSDL

Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
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?



Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Bob Nedwor
hangman
Ranch Hand

Joined: Aug 17, 2005
Posts: 215


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.


Bob N
SCJP - 1.4
SCJD - (B&S) Used 1.5 And It Runs On Solaris10
SCWCD - Thanks to HFSJ!!
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it a valid <include> for a WSDL