About Question enthuware.ocejws.v6.2.12

Moderators: Site Manager, fjwalraven

Post Reply
yrpatil07@gmail.com
Posts: 3
Joined: Wed Apr 29, 2015 1:52 am
Contact:

About Question enthuware.ocejws.v6.2.12

Post by yrpatil07@gmail.com » Wed Apr 29, 2015 4:46 am

Hi,

I think for this question correct answer is no.2 instead of no1.

Code: Select all

public String log(String msg)
method is from SIE so it will be exposed as web method. And method

Code: Select all

public String logN(String msg)
is a valid public method from SIB, so it will also get exposed as web service method.

So answer of the question should be :

log(), logN()

Best Regards,
Yogesh Patil

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

Re: About Question enthuware.ocejws.v6.2.12

Post by fjwalraven » Wed Apr 29, 2015 2:46 pm

Hi Yogesh,

Although not stated very clear in the JAX-WS specification, you can deduct it from there. (Check chapter 3.3 Class).

- All WebService methods come from a SEI, either from an explicit SEI or from an implicit SEI.

The explicit SEI (i.e. endpointInterface attribute) exposes all method declared in the interface (and it's superinterfaces).

If there is an implicit SEI (there is no endpointInterface attribute in the WebService annotation on the SIB) 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 javax.jws.WebMethod annotation with the exclude element set to false or missing (since false is the default for this annotation element).
2. They are not annotated with the javax.jws.WebMethod annotation but their declaring class has a javax.jws.WebService annotation.
Regards,
Frits

yrpatil07@gmail.com
Posts: 3
Joined: Wed Apr 29, 2015 1:52 am
Contact:

Re: About Question enthuware.ocejws.v6.2.12

Post by yrpatil07@gmail.com » Thu Apr 30, 2015 2:44 am

Hi Frits,

Thank you for clarification. I think its clear for me now. :D

Best Regards,
Yogesh Patil

vini_srcna
Posts: 6
Joined: Sat Sep 17, 2016 2:29 am
Contact:

Re: About Question enthuware.ocejws.v6.2.12

Post by vini_srcna » Sat Sep 17, 2016 5:18 am

Hi, It is not clear to me, may be I am using latest version of JAX-WS. How do I find it by the way ?. (version of xjc, schemagen ? )

I have an SEI (named Contract) and SIB(named SubtractClass).
SEI declares two methods, add and sub.

There is an abstract class (AddClass) which implements only add method of SEI, not annotated as @WebService.

There is a SubtractClass which extends AddClass and implements "sub" method plus an additional "divide" method.

SubtractClass is annotated with @WebService and with endpointInterface pointing to SEI(Contract in this case).

When deployed I see all the operations in WSDL (add, sub and divide). May be I am doing something wrong...Please help me.

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

Re: About Question enthuware.ocejws.v6.2.12

Post by fjwalraven » Sun Sep 18, 2016 2:04 pm

i, It is not clear to me, may be I am using latest version of JAX-WS. How do I find it by the way ?.
Check the EE6 provider's info page. If you are using Glassfish, check https://glassfish.java.net/downloads/v3-final.html
When deployed I see all the operations in WSDL (add, sub and divide). May be I am doing something wrong...Please help me.
You are not doing anything wrong: this is an example where the server doesn't implement the JAX-WS 2.x specifications strictly. It really should only expose the methods of the SEI (from JAX-WS 2.2):
3.3 Class
In order to allow for a separation between Web service interface and implementation, if the WebService annotation on the class under consideration has a endpointInterface element, then the interface referred by this element is for all purposes the SEI associated with the class.
...
3.5 Method
Each public method in a Java SEI is mapped to a wsdl:operation element in the corresponding wsdl:portType plus one or more wsdl:message elements.
Regards,
Frits

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest