Parsing WSDL to Retrieve Service / Port Items

I want to automatically parse the WSDL file to discover specific service / port elements. Is this possible using Java or some kind of Ant utility? If so, how?

+1


source to share


2 answers


JAX-WS does contain WSDL parsing code and allows you to inspect WSDL ports and services.

If you are looking for something more robust, you can manipulate or inspect other parts of WSDL, WSDL4J might be of use to you. WSDL4J may also have the added benefit of not being an approved "stand-alone technology" , which means you can easily include it in your classpath without having to worry about conflicting with the JVM version your code is running on.



If you really need to make web service calls and only need to inspect the high-level portions of the WSDL, JAX-WS will work fine. If you need something more portable without any configuration overhead and / or you really don't need to make web service calls, WSDL4J might be your best bet.

+1


source


The .NET framework has a System.Web.Services.Description.ServiceDescription type that will help, but you can check it out ...

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



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

+1


source







All Articles