I have a web service created several years ago in C ++ and consumed by the .NET client using C # "wsdl.exe" to create client stubs. For a number of reasons, I also need a Java client and I want to limit the use of Java 6 (JDK 1.6) with JAX-WS. The generated stubs work fine even if they are packaged in .jar, but I have a problem with how JAX-WS Web services clients want to be deployed. It seems that the problem I have is solvable, but none of the suggested methods work.
JAX-WS expects the WSDL to be available, preferably from the network, as it processes the WSDL every time it starts to create bindings. Like jgrowl in creating a web service client with well-known but inaccessible wsdl , the client may not have access to WSDL at the URL used by JAX-WS (which will probably be a file on the build machine or a pointer to localhost). I want to send the WSDL inside the .jar client, but the simplest solution ( -wsdllocation "/path/to/wsdl/in/jar.wsdl") is displaying a warning that I don't want to show.
I would also prefer that the client doesn't do something like a jgrowl solution that seems to work, but not just work. The articles found on WSDL sites are primarily Google’s address servers, but suggest that clients can work with META-INF/jax-ws-catalog.xmlfiles that translate the URL used in -wsdllocationto the path in the .jar file, but they don't seem to work in our testing.
Is there a “recipe” so that I can place the WSDL inside the .jar somewhere and for the JAX-WS client to just work without any extra effort on the part of the client and without warning?
source
share