Packaging WSDLs in JAX-WS Applications

It is definitely a good idea to include them in the META-INF/wsdl folder in your archives.

If you are developing portlets, you can retrieve them from the portlet context:

new SampleService(getPortletContext().getResource("/META-INF/wsdl/SampleService.wsdl"), new QName("", "SampleService"));

You can also use service references in your deployment descriptors:

  <service-qname xmlns:sample="">sample:SampleService</service-qname> <!-- optional -->

If a catalog is used, you can omit the wsdl-file and service-qname elements.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s