Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
kevinliu
Product and Topic Expert
Product and Topic Expert
0 Kudos
It has been a while since I first wrote about A note on wsdl and xsd imports based on WS-I BP recommendations. In the last year, W3C has done a lot of work to resolve the problem in WSDL2.0. Here is an update about the WSDL 2.0 solution.

Summary of WSDL 2.0 Solution

The following table provides a summary of the importing and including mechanisms in WSDL 2.0.

MechanismObjectMeaningVisibility of Schema Components
wsdl:importWSDL 2.0 NamespaceDeclare that WSDL 2.0 components refer to WSDL 2.0 components from a DIFFERENT targetNamespace.XML Schema Components in the imported description are NOT visible to the containing description
wsdl:includeWSDL 2.0 DocumentMerge Interface, Binding and Service components from another WSDL 2.0 document that has the SAME targetNamespace.XML Schema components in the included description are visible to the containing description.
wsdl:types/ xs:importXML Schema NamespaceDeclare that XML Schema components refer to XML Schema components from a DIFFERENT targetNamespace.XML Schema components in the imported namespace are visible to the containing description.
wsdl:types/ xs:schema/xs:importXML Schema NamespaceDeclare that XML Schema components refer to XML Schema components from a DIFFERENT targetNamespace.XML Schema components in the imported namespace are NOT visible to the containing description
wsdl:types/ xs:schema/xs:includeXML Schema DocumentMerge XML Schema components from another XML Schema document that has the SAME or NO targetNamespace.XML Schema components in the included document are visible to the containing description.


The Key Differences Between WS-I BP and WSDL 2.0 Solutions

WS-I solution described in A note on wsdl and xsd imports was based on WSDL1.1. It inherited the limitations of WSDL1.1 and sometimes had to rely on work-arounds to resolve a problem. W3C has more freedom for redesigning the architecture of WSDL. It aims to provide a more coherent solution in WSDL 2.0.

While the majority of the WSDL 2.0 solution is aligned with WS-I BP1.x, there are indeed at least two important differences:

  • WSDL2.0 models more closely to XSD. It adds wsdl:include to allow merging wsdl components in same namespace from external files.
  • WSDL2.0 allows use of xs:import directly under wsdl:types to bring schema components defined in external files into a WSDL description.
Where to Get More Details?

If the summary above is not sufficient for you, read the WSDL 2.0 primer, especially section 2.3 and section 3. These sections provide a detail explanation and many examples for the importing and including mechanisms.