Page 1 of 1

About Question enthuware.ocejws.v6.2.97 :

Posted: Tue Feb 25, 2014 11:49 am
by t.alex
Hi,

could you please explain why the third option is wrong?

A service instance can be created with the WSDL document location and the qualified name:

http://docs.oracle.com/javaee/6/api/jav ... tml#create(java.net.URL, javax.xml.namespace.QName)

Why do you say it should be created only with the serviceName?

Thanks,
Alex

Re: About Question enthuware.ocejws.v6.2.97 :

Posted: Tue Feb 25, 2014 3:39 pm
by fjwalraven
Hi Alex,

I agree I should update the explanation.

The reason why the third option doesn't work lies in fact that we have used the @WebServiceProvider annotation. By default the JAX-WS runtime does not generate a WSDL for WebServiceProvider classes. (as it doesn't know what operations are supported)

If we now use the url in our Service creation, it will fail because there is no WSDL published at that location.

Code: Select all

url = new URL(endpoint + "?wsdl");
Service service = Service.create(url,serviceName);
Thanks for your feedback!

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.97 :

Posted: Wed Feb 26, 2014 1:31 am
by t.alex
thanks for the explanation! :)