Loading ...

How to Generate an XSD From a WSDL

Updated July 20, 2017

Web Services Description Language (WSDL) is an XML format for describing Web services that enable host-to-host communication over a network. WSDL definitions are comprised of endpoints that receive messages and, when needed, reply with messages. The XML Schema Datatype (XSD) specification describes the data requirements of a Web service. In short, the WSDL describes the functions and method calls supported by the Web service, and the XSD describes the data. It is often necessary to extract the XSD details from a WSDL to provide to developers or maintainers of the remote end of your host-to-host communication, which in turn facilitates XML schema validation using the XSD file.

Loading ...
  1. Launch the Windows text editor by clicking the "Start" menu in the lower left corner of the desktop followed by "Run..." Enter "notepad" in the text field, and then click "OK."

  2. Choose "File" followed by "Open" from the "Notepad" menu bar. Navigate to the location of your WSDL file, highlight the file with your mouse and click "OK" to open.

  3. Search the document by clicking "Edit" followed by "Find" to identify the first occurrence of the XML tag "." This marks the beginning of the XSD portion of the WSDL file.

  4. Search again to locate the closing XML tag "." This marks the end of the XSD portion of the WSDL file. By clicking on while holding the "Shift" key, you may use the arrow keys to select all of the text between the beginning and ending XML tag.

  5. Copy the selected portion of the document beginning with "" and the closing tag "" inclusive of the "wsdl:types" XML nodes by clicking "Edit" followed by "Copy" from the "Notepad" menu.

  6. Click "File" followed by "New" to create a new file.

  7. Paste the XSD portion of the document from Step 4 into the new file by clicking "Edit" followed by "Paste" from the "Notepad" menu.

  8. Save the new file by clicking "File" followed by "Save as..." from the menu. The new file is now a candidate for sharing with fellow Web service authors who are required to validate against the XSD schema extracted from the WSDL.

Loading ...

Things You'll Need

  • Text editor
  • WSDL file

About the Author

First published in 1999, J. Robert Brown is the author of two textbooks and numerous short stories. A former scientist for Los Alamos National Laboratory and the recipient of three patents, Brown is currently crafting embedded system software for an up and coming startup firm in South Florida. He earned his Master of Science from Columbia University in computer engineering.

Loading ...