Is there any way by which I can generate xsd from wsdl. Any link or tool will also do. What is the simplest way to do this?
6 Answers
You can use SoapUI: http://www.soapui.org/ This is a generally handy program. Make a new project, connect to the WSDL link, then right click on the project and say "Show interface viewer". Under "Schemas" on the left you can see the XSD.
SoapUI can do many things though!
-
9I can't find an option to export XSD from this tool... do you just mean to use it as a WSDL viewer and use it to copy and paste the content of
<wsdl:types>element as suggested in @helderdarocha's comment (which seems correct)? Jan 28, 2015 at 15:27 -
8
-
4Awesome. I tried using the svcutil.exe and it generated schemas but multiple XSD files not just one XSD file as a client requested. Just copying and pasting from SOAPUI (again the stuff between the <wsdl:types> tags) and saving that as an XSD file worked beautifully. No fooling around with coda obscura like what flags/params to use with the Microsoft tools. No merging files. Copy, paste, save, done. Thanks for the info. SOAPUI is a great tool.– infocydeMar 1, 2016 at 18:29
-
3In case this is a problem for anyone else reading, the copy-paste to new file doesn't always create a consistent schema. It works for small, single-schema WSDL files. However, on a WSDL I've been provided with (by a 3rd party), there are 6 different Schemas without related import statements. So I guess the quality of this solution depends on the quality of the WSDL provided.– DrUsefulDec 15, 2016 at 8:00
-
2
Follow these steps :
- Create a project using the WSDL.
- Choose your interface and open in interface viewer.
- Navigate to the tab 'WSDL Content'.
- Use the last icon under the tab 'WSDL Content' : 'Export the entire WSDL and included/imported files to a local directory'.
- select the folder where you want the XSDs to be exported to.
Note: SOAPUI will remove all relative paths and will save all XSDs to the same folder. Refer the screenshot : 
-
44It only exports the WSDL, not the XSD files. (using SoapUI 5.2.1) perhaps I'm doing something wrong? Nov 16, 2015 at 7:18
-
2
-
1@PimHazebroek I have added a screenshot for reference , I am using SoapUI 5.4.0– RajMay 22, 2019 at 13:10
-
3In SoapUI 5.5 the option only generates one wsdl file, you can proceed with a dirty copy-paste operation to get the scheme definition inside:
wsdl:definitions -> wsdl:types -> xs:schemaand create a new file with xsd extension. Add the first line if is necessary:<?xml version="1.0"?>Jan 10, 2020 at 19:49 -
(WHEN .wsdl is referring to .xsd/schemas using import) If you're using the WMB Tooklit (v8.0.0.4 WMB) then you can find .xsd using following steps :
Create library (optional) > Right Click , New Message Model File > Select SOAP XML > Choose Option 'I already have WSDL for my data' > 'Select file outside workspace' > 'Select the WSDL bindings to Import' (if there are multiple) > Finish.
This will give you the .xsd and .wsdl files in your Workspace (Application Perspective).
Once I found an xsd link on the top of the wsdl. Like this wsdl example from the web, you can see a link xsd1. The server has to be running to see it.
<?xml version="1.0"?>
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl"
xmlns:tns="http://example.com/stockquote.wsdl"
xmlns:xsd1="http://example.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
You can Use utilityarena.com it has a free utility to convert complex wsdls to xsd
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.– Community BotApr 19, 2023 at 13:00
- Soap ui -> New SOAPUI project -> use wsdl to create a project (lets assume we have a testService in it)
- you will have a folder called TestService and then inside it there will be tokenTestServiceSoapBinding (example) -> right click on it
- Export definition -> give location where you need to place the definition.
- Exported location will have xsd and wsdl files. Hope this helps!
-
As in other answers, different versions of SoapUI do not export the XSD in this way, which version are you using?– iBobbJan 19, 2023 at 14:56
-
<types/>element in the WSDL. If it's imported, you just have to get the URL (and possibly calculate the absolute path, if it is relative). If it is embedded, extract the contents of<types/>.