Arci
Arci

Reputation: 6819

How to view WSDL on a JAX-WS web service running under Glassfish?

How can I view the WSDL of my JAX-WS web service if I'm running it under Glassfish? I know I can generate the WSDL file using wsgen, but I'm want to know if I can have a runtime WSDL on Glassfish?

I've tried running my web service on Tomcat and I was able to get a runtime WSDL by accessing the URL pattern I specified on web.xml. However, since I don't have a web.xml on my JAX-WS web service on Glassfish, I'm not sure how I'm going to access my WSDL.

Upvotes: 1

Views: 5034

Answers (2)

ROMANIA_engineer
ROMANIA_engineer

Reputation: 56666

  1. Start the GlassFish server (E.g.: from the Servers tab in Eclipse).
  2. Navigate to GlassFish Console (E.g.: http://localhost:4848/common/index.jsf)
  3. On the left side, click on Applications
  4. On the right side, click on the project name
  5. In the Modules and Components section, click on View Endpoint in the Action column
  6. Click on the WSDL value (E.g.: /Test/MyClassService?wsdl - now you are in http://localhost:4848/common/applications/webServiceWsdl.jsf?appName=Test&wsdl=%2FTest%2FMyClassService%3Fwsdl)
  7. Now you can 2 see links (for HTTP and HTTPS). Click on the first one (E.g.: http://localhost.localdomain:8080/Test/MyClassService?wsdl) and you will see the WSDL file.

Upvotes: 0

Nick Wilson
Nick Wilson

Reputation: 4989

As long as you know the endpoint URL of your web service you should be able to view the runtime WSDL by appending ?wsdl to the end of the URL.

Upvotes: 3

Related Questions