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("http://fernandoribeiro.eti.br/sample/jaxws", "SampleService"));

You can also use service references in your deployment descriptors:

<service-ref>
  <service-ref-name>service/SampleService</service-ref-name>
  <service-interface>br.eti.fernandoribeiro.sample.jaxws.SampleService</service-interface>
  <wsdl-file>META-INF/wsdl/SampleService.wsdl</wsdl-file>
  <service-qname xmlns:sample="http://fernandoribeiro.eti.br">sample:SampleService</service-qname> <!-- optional -->
</service-ref>

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

https://metro.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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