Question

I am deploying a Web Service class using @WebService on WebSphere 8.5. I always get the warning

This implementation does not contain a WSDL definition and is not a SOAP 1.1 based binding. Per the JAXWS specification, a WSDL definition cannot be generated for this implementation.

I need to have the WSDL generated. Which is the correct way to specify the correspondent wsdl to my classes in order to get it generated when the webservice is called

Was it helpful?

Solution

The error message indicates that you're using the v1.2 of SOAP.

Per the JAX-WS spec, if you've specified the v1.2 of SOAP in your sun-jaxws.xml file using the following entry, your wsdl will not be automatically generated

binding="http://www.w3.org/2003/05/soap/bindings/HTTP/" 

The line above indicates to the JAX-WS runtime that SOAP1.2 is to be used but it also stipulates that the wsdl should not be generated.

If you want to ensure that the wsdl is generated but still want to use SOAP 1.2, you should use the following binding attribute instead

binding="http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/"

Reference:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top