About Question enthuware.ocejws.v6.2.15
Moderators: Site Manager, fjwalraven
-
- Posts: 27
- Joined: Tue Nov 15, 2016 11:20 am
- Contact:
About Question enthuware.ocejws.v6.2.15
Hi Fritz,
I think the answer to this question is either wrong or you need to provide some explanation.
I was reading the JAX-WS spec and in there in Chapter 3 (Section 3.4.1) it mentions that:
Conformance (Inheritance flattening): A mapped wsdl:portType element MUST contain WSDL definitions for all the method of the corresponding Java SEI including all inherited methods.
So, in this case they have not specified whether the super class should contain the @WebService annotation and this leads me to think that LogServiceSuper.logSuper method will also be exposed.
This is confirmed in this JIRA
Please also read this articlefrom IBM.
It looks like the answer was correct for the LEGACY interpretation but INCORRECT for NEW interpretation. I am really confused on WHICH approach should I fix my mind on as I might end up giving an incorrect answer using an incorrect version of the spec despite knowing both things. I would be grateful if you can clear up this confusion.
Look forward to your response.
Thanks
I think the answer to this question is either wrong or you need to provide some explanation.
I was reading the JAX-WS spec and in there in Chapter 3 (Section 3.4.1) it mentions that:
Conformance (Inheritance flattening): A mapped wsdl:portType element MUST contain WSDL definitions for all the method of the corresponding Java SEI including all inherited methods.
So, in this case they have not specified whether the super class should contain the @WebService annotation and this leads me to think that LogServiceSuper.logSuper method will also be exposed.
This is confirmed in this JIRA
Please also read this articlefrom IBM.
It looks like the answer was correct for the LEGACY interpretation but INCORRECT for NEW interpretation. I am really confused on WHICH approach should I fix my mind on as I might end up giving an incorrect answer using an incorrect version of the spec despite knowing both things. I would be grateful if you can clear up this confusion.
Look forward to your response.
Thanks
-
- Posts: 27
- Joined: Tue Nov 15, 2016 11:20 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.15
Also as per code ranch https://coderanch.com/wiki/659895/OCEJWSD-Links
the JAX-WS version we need to stduy for exam is 2.2 and the text that I referred to is also from JAX-WS 2.2 Rev a. Please help asap. Thanks
the JAX-WS version we need to stduy for exam is 2.2 and the text that I referred to is also from JAX-WS 2.2 Rev a. Please help asap. Thanks
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.15
see also viewtopic.php?f=40&t=2489
Note that in this question there is no Service Endpoint Interface (SEI) involved, only a Service Implementation Bean (SIB).
If there was a SEI then the following rules apply (in conformance with the JAX-WS 2.x specs)
The following methods are exposed in a WebService with a SIB referring a SEI:
- all methods from the interface (or parent interfaces), regardless of:
- the @WebMethod annotation being absent
- the parent interface having a @WebService annotation
Does this make things clear?
Regards,
Frits
Note that in this question there is no Service Endpoint Interface (SEI) involved, only a Service Implementation Bean (SIB).
If there was a SEI then the following rules apply (in conformance with the JAX-WS 2.x specs)
The following methods are exposed in a WebService with a SIB referring a SEI:
- all methods from the interface (or parent interfaces), regardless of:
- the @WebMethod annotation being absent
- the parent interface having a @WebService annotation
Does this make things clear?
Regards,
Frits
-
- Posts: 27
- Joined: Tue Nov 15, 2016 11:20 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.15
Thanks Frits, I thought about the difference between SEI and SIB but still confused regarding following:fjwalraven wrote:see also viewtopic.php?f=40&t=2489
Note that in this question there is no Service Endpoint Interface (SEI) involved, only a Service Implementation Bean (SIB).
If there was a SEI then the following rules apply (in conformance with the JAX-WS 2.x specs)
The following methods are exposed in a WebService with a SIB referring a SEI:
- all methods from the interface (or parent interfaces), regardless of:
- the @WebMethod annotation being absent
- the parent interface having a @WebService annotation
Does this make things clear?
Regards,
Frits
1. If a SIB does not specify an interface then it is assumed to be implementing the SEI itself. So, this mean that the rule for SEI should also apply to SIB in case it does not explicitly state a SEI?
2. Consider the following
Code: Select all
interface ServiceInterface { ...}
class SomeOtherClass{...}
@WebService(endpointInterface="ServiceInterface ")
class ExampleClass extends SomeOtherClass {... }
Thank you
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.15
This case is called an implicit SEI. The rules for a SIB with an implicit SEI are different then from a SIB with an explicit SEI.1. If a SIB does not specify an interface then it is assumed to be implementing the SEI itself. So, this mean that the rule for SEI should also apply to SIB in case it does not explicitly state a SEI?
If there is an implicit SEI then the following methods will be exposed:
All of the public non-static or non-final methods that satisfy one of the following conditions:
1. They are annotated with the @WebMethod annotation with the exclude element set to false or missing (since false is the default for this annotation element).
2. Methods not annotated with @WebMethod annotation but their declaring class (might be a parent class) has a @WebService annotation.
You are missing the WebService annotation on the ServiceInterface but I assume that it is there. To answer your question: no, when an explicit SEI is involved only the methods of the ServiceInterface (and super-interfaces) will be exposed.As per your explanation, in the above ExampleClass, methods declared in ServiceInterface will be exposed along with those in ExampleClass but, methods in SomeOtherClass will only be exposed if that class has a @WebService annotation?
Regards,
Frits
-
- Posts: 27
- Joined: Tue Nov 15, 2016 11:20 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.15
Thanks for the explanation. I understand this now much better.
Who is online
Users browsing this forum: No registered users and 65 guests