Although this won't specifically address the "how to" fix bad WSDL issue, there are very good practices discussed in the following from Glen Mazza's web services blog
http://www.jroller.com/gmazza/entry/web_service_tutorial In addition, the packaging of WSDL/XSD in the WS client JAR are discussed in this thread (regardless of CXF vs Metro). http://metro.1045641.n5.nabble.com/JAX-WS-clients-td5709817.html In addition there is this item: http://stackoverflow.com/questions/4163586/jax-ws-client-whats-the-correct-path-to-access-the-local-wsdl HTH at least some. Mark On Thursday, April 10, 2014, Andrew Janke <[email protected]> wrote: > Hi, CXF users and devs, > > What are the best practices for using CXF with "broken" or problematic > WSDLs, especially on the client side? > > I'm working on a project where I need to create clients to connect to > several established SOAP web services. Some of them have WSDLs which seem > invalid or have other issues. Getting the services or published WSDLs to > change is not an option, since these are provided by large organizations > and have been in production for a long time. So I'm having to hack up the > WSDLs on the client side to get wsdl2java to validate them and generate > code, and will need to do additional adjustments. > > For example, I'm trying to get this to work. > https://misapi.ercot.com/2007-08/Nodal/eEDS/EWS/?WSDL > CXF doesn't like it because the <types> just has <complexType> and > <element> elements under it, instead of them being wrapped up in > <xsd:schema>, so references fail to resolve. And CXF doesn't like multiple > operations with the same signature. I'm editing a local copy to use > <xsd:schema> and so on. > > Anyone have ideas on the best way to do this? Most of the doco on CXF > assumes you're working with a "correct" web service that's published out on > the web, and has a valid WSDL. How should I be storing and referring to the > local hacked-up copy of the WSDL? As a resource under the Java source tree, > using getResource() to locate it in my client code? Should I be "patching" > the WSDL with a different technique? Are there any other tools or guides > that could help with doctoring problematic WSDLs? > > Cheers, > Andrew > > -- > Andrew Janke > [email protected] >
