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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.