How to Extract XSD from WSDL
The Extract XSD from WSDL in Java is a good starting point.
Another method is using .NET tools roundtrip which is based on wsdl and svcutil tools. One generates C# classes from WSDL and another generates XSD from C# classes. It usually results in multiple XSD files.
I have extracted PhoenixXML schema using this steps.
- Look inside WSDL file and find part:
<wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://lbss.com/PhoenixXM/"> <s:element name="GetSchema">
Extracted content inside
into XSD file.
- Insert in the begining of the file:
<?xml version="1.0" encoding="UTF-8" ?>
- Fix Root Element
<s:schema xmlns:s="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://lbss.com/PhoenixXM/" xmlns:tns="http://lbss.com/PhoenixXM/">
I had to define XMLSchema namespace and add
xmlns:tns, because it was used by the original content.