Get a list of all non-built types from WSDL?
Given WSDL / XSD, what's the easiest way to create a list of all simple and complex types? (Java preferred.)
i.e.
<xsd:element name="ThirdPartyProductInfo" type="typens:ThirdPartyProductInfo" minOccurs="0"/>
<xsd:element name="SalesRank" type="xsd:string" minOccurs="0"/>
<xsd:element name="BrowseList" type="typens:BrowseNodeArray" minOccurs="0"/>
I expect the output to be:
ThirdPartyProductInfo, BrowseNodeArray, + all types mentioned above.
Regexp will probably miss a few cases, perhaps JDOM? SAX? Other?
Thanks.
XPath is a quick and easy way to grab certain elements that you are trying to reach. I haven't done a lot of web services in the past few years, but I guess Axis toolkit comes with a WSDL utility for Java? If so, it will probably help you too.
Of course, it is quite possible that I am missing what you are trying to do.
Hooray!
a source to share
You can use XmlBeans to parse the XSD and validate it. You probably still need a fair amount of code to parse the XSD programmatically. If you don't have sufficient knowledge of XSD, the XmlBeans API can be a little cumbersome. The Javadoc is pretty good, but you should know what you are doing ...
a source to share