How to Import XSD Into WSDL
Web service description language (WSDL) is a model and format for describing web services using XML. A consumer can locate a service and execute its operations. This process can be automated using most common development tools, enabling application integration with little developer produced code. WSDLs are a contract between the service provider and consumer; it makes a service self-describing. WSDLs provide descriptions of all public operations, data types for all service messages, binding details for the transport protocol and service address information. An "import" element can be used in a WSDL to import external WSDLs or XML schemas. Importing external items is useful for allowing the WSDL to be more modular, reuse of XML data types among multiple service definitions and support multiple versions of a schema.
Things You'll Need
- Text or XML editor
Create new file in your text or XML editor. If the editor supports WSDLs, select WSDL as the file type. If it does not support WSDLs, but supports XML, select XML as the file type. If neither WSDLs or XML are supported, select a plain text file type.
Name the file with any name you desire, and give the file a ".wsdl" extension. For example, the file can be named "HelloWorld.wsdl."
Create a second new file in your text or XML editor. If the editor supports XML schemas, select XML schema or XSD as the file type. If it does not support XML schemas, but supports XML file, select XML as the file type. If neither XML schemas or XML are supported, select a plain text file type.
Name the file with any name you desire, and give the file a ".xsd" extension. For example, the file can be named "HelloWorld.xsd."
Enter the following markup in the XML schema file you created:
Enter the following markup in the WSDL file you created:
Tips & Warnings
- New technologies such as metadata exchange, MEX, have been introduced to share information about what capabilities a service supports, but these standards have not yet been widely adopted.
- WSDLs support includes and imports. They may sound similar, but they behave differently. An import statement imports another namespace. An include statement imports XML data type declarations into an existing namespace.