Skip to main content
Skip table of contents

Import Element

The use of the import element allows the separation of the different elements of a service definition into independent documents, which can then be imported as needed. The following example shows how to import a XML Schema document instead of using the WSDL types section. The import will resolve the reference if possible.

HTML/XML
 <definitions name="StockQuote" targetNamespace="http://example.com/stockquote/definitions" xmlns:tns="http://example.com/stockquote/definitions">

   <import namespace="http://example.com/stockquote/schemas" location=
     "http://example.com/stockquote/stockquote.xsd"/>

   <message name="GetLastTradePriceInput">
      ...
   </message>

   <message name="GetLastTradePriceOutput">
      ...
   </message>

   <portType name="StockQuotePortType">
      ...
   </portType>

   <binding name="StockQuoteSoapBinding" type="defs:StockQuotePortType">
      ...
   </binding>

   <service name="StockQuoteService">
      ...
   </service>
 </definitions>

WSDL allows also importing other definition parts except type definitions. This is not supported by the WSDL Importer yet.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.