About Question enthuware.ocejws.v6.2.32

Moderators: Site Manager, fjwalraven

Post Reply
sttaq0442
Posts: 27
Joined: Tue Nov 15, 2016 11:20 am
Contact:

About Question enthuware.ocejws.v6.2.32

Post by sttaq0442 » Thu Nov 17, 2016 6:59 am

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

fjwalraven
Posts: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.32

Post by fjwalraven » Thu Nov 17, 2016 2:09 pm

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

javabean68
Posts: 22
Joined: Wed Mar 16, 2016 8:38 am
Contact:

Re: About Question enthuware.ocejws.v6.2.32

Post by javabean68 » Sun Jun 24, 2018 1:55 pm

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

fjwalraven
Posts: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.32

Post by fjwalraven » Sun Jun 24, 2018 11:34 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest