Question

I want to automatically process a WSDL file to discover defined Service / Port elements. Is this possible, using Java or some sort of Ant utility? If so, how?

Was it helpful?

Solution

JAX-WS does indeed contain WSDL parsing code and does allow you to inspect the WSDL ports and services.

If you are looking for something that might be more robust, allows you to manipulate or inspect other parts of the WSDL, WSDL4J might be useful for you. WSDL4J may also have the added benefit of not being an endorsed "Standalone Technology" meaning that you can easily include it in your classpath without worrying about it conflicting with the version of the JVM your code runs on.

If you actually have to make Web service calls and only need to inspect the high-level parts of the WSDL, JAX-WS will work fine. If you need something more portable without possible configuration overhead and/or you don't actually need to make Web service calls, WSDL4J may be a better choice.

OTHER TIPS

The .NET framework has the System.Web.Services.Description.ServiceDescription type that will help, but you might want to check out this...

http://mikehadlow.blogspot.com/2006/06/simple-wsdl-object.html

... which shows you a "simple WSDL object".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top