2 Replies Latest reply on Feb 11, 2008 3:21 AM by ropalka

    Generating a WSDL statically (from ant?)

      As we all know, "JBoss is cool". Using JBoss AS 4.2.2 and Seam 2.0.1, I set up a web service bean by simply annotating a class with @Stateless @WebService, and then annotated a method with @WebMethod, and presto, I have a working web service.

      On the other side of things, I quickly built a client in NetBeans. All I needed to do was put in the URL of the service, and NetBeans 6 grabbed the WSDL by querying the URL, and then created the necessary artifacts. Then to use it, I just drag the web service node straight into a Java class, and there it is. It works too. Cool! Five minutes to create a web service and client.

      But now I want to have more control over what is going on.

      Specifically, I would like to generate the WSDL file and save it as a file, so I can put it into the build tree of the client, and the client can generate its artifacts without needing to do an HTTP request.

      Second, the WSDL that is generated has a hard-coded server URL. This is not good, because the clients may end up connecting to a variety of servers; the end user should pick a server to use. How do I get the WSDL to not specify a server, and then let the client side pick the server URL?

      Thanks for pointers on this.

      I have looked at the Sun JAX-WS documentation, and it is sparse. I looked for books on this and didn't see any that cover J2EE 5.0.