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.
<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>
Overview
Content Tools