Page 1 of 1

About Question enthuware.ocejws.v6.2.32

Posted: Thu Nov 17, 2016 6:59 am
by sttaq0442
Hi Frits,

I tried the following in NetBeans 8.2:

Code: Select all

@WebService(serviceName="LWS", endpointInterface="LogService", name="LS")
using GlassFish server for deployment. It appeared to append the portType name as well. So in this case the URL would be /log/LWS/LS.

Can you please confirm that for the purpose of exam we need to remember that the URL will always be like this: /rootContext/serviceName ?

Thanks

Re: About Question enthuware.ocejws.v6.2.32

Posted: Thu Nov 17, 2016 2:09 pm
by fjwalraven
Interesting: the implementation in Glassfish seems to have changed over time!
Can you please confirm that for the purpose of exam we need to remember that the URL will always be like this: /rootContext/serviceName ?
Yes!

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.32

Posted: Sun Jun 24, 2018 1:55 pm
by javabean68
Hallo Frits,

here I would have expected the antwort 4 (/log/LogServiceImplService). I have read somewhere that if the @Webservice is on the SEI, the @Webservice on the SIB is ignored and then the URL would be SIB + "Service".

Is that instead wrong?

Thank you very much in advance
Regards
Fabio

Re: About Question enthuware.ocejws.v6.2.32

Posted: Sun Jun 24, 2018 11:34 pm
by fjwalraven
Hi Fabio,
if the @Webservice is on the SEI, the @Webservice on the SIB is ignored
This is correct when it comes to which methods are exposed in the webservice.

But... for the attributes/elements of the @Webservice annotation it is a bit different (and tricky!)

This is from the specs JSR-181:
3.1 Service Implementation Bean
The implementation bean MAY reference a service endpoint interface by using the @WebService.endpointInterface annotation. If the implementation bean references a service endpoint interface, it MUST implement all the methods on the service endpoint interface. If the implementation bean references a service endpoint interface, that service endpoint interface is used to determine the abstract WSDL contract (portType and bindings). In this case, the service implementation bean MUST NOT include any JSR-181 annotations other than @WebService and @HandlerChain. In addition, the @WebService annotation MUST NOT include the name annotation element.

3.2 Service Endpoint Interface
The service endpoint interface MUST NOT include the JSR-181 annotation elements portName, serviceName and endpointInterface of the annotation @WebService.
Regards,
Frits