cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <ning.ji...@iona.com>
Subject Something about the SEI
Date Wed, 01 Nov 2006 08:37:51 GMT
Hi,

I just went through the JAX-WS 2.0 specification (Final Release April 
19, 2006) about the SEI , and found there some interesting use cases CXF 
can't treat properly.
Here is how can we get the SEI from implementation class in the Chapter 
3 "Java to WSDL 1.1 Mapping" P30.

" 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.

Otherwise, the class implicitly defines a service endpoint interface 
(SEI) which comprises all of the public
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.

For mapping purposes, this implicit SEI and its methods are considered 
to be annotated with the same Web
service-related annotations that the original class and its methods have.
In pratice, in order to exclude a public method of a class annotated 
with WebService and not directly
specifying a endpointInterface from the implicitly defined SEI, it is 
necessary to annotate the method
with a WebMethod annotation with the exclude element set to true."

The specification talked about two situations, one is about the  SEI 
defined in the WebService annotation explicitly.
the other is about implicitly definition of SEI.

In CXF, we treat SEI as A interface class which is defined in 
JaxWsImplementorInfo,

 public Class<?> getEndpointClass() {
        Class endpointInterface = getSEIClass();
        if (null == endpointInterface) {
            endpointInterface = getImplementorClass();
        }
        return endpointInterface;
    }

In most cases this definition works fine, but there also some use cases 
we can't treat the SEI class as A kind of interface class.
eg,

@WebService
public class A implements B,C,D

B, C are the interface which are annotated with "WebService".

In CXF, we just can tell B is the SEI , and will forget the all 
"WebMethod" which are defined in the interface C. 
IMO , we should filter all the methods in class A, to tell which method 
is the "WebMethod" as the specification said and The SEI should 
comprises these methods.

Any thoughts?

Willem.

-- 
Willem Jiang
Software Engineer

IONA Asia Pacific Software Development Center
2/F, Unit A, Information Center
Zhongguancun Software Park Haidian District,
Beijing, P.R.China (100094)

Tel: +86-10-82825151 - 523
Fax: +86-10-82825210
Email: ning.jiang@iona.com



Mime
View raw message