Thursday, July 28, 2011

WSDL parser reloaded

Here a previous post on the topic

Here the WSDL 1.1 Schema:
http://schemas.xmlsoap.org/wsdl/


Import it into a Eclipse Web Service project (it has all the facets needed for JAXB)
and generate JAXB classes (I use org.example.wsdl package)

Trying to unmarshal a WSDL, I get a

java.lang.ClassCastException: javax.xml.bind.JAXBElement

(see here)

so I choose a better API for Unmarshaller (don(t try to understand; just make it work)


And.... here is the WSDLParser!

In reality as you start working with TDefinitions you realize that it's quite difficult to extract the information you need, because the http://schemas.xmlsoap.org/wsdl schema is VERY abstract.

As usual, simple things made complicated by academics.

No comments: