On Wednesday, May 25, 2011 11:05:18 PM Willem Jiang wrote:
> Sorry, I click the send button too quickly to find some typo in my mail.
> 
> Hi Dan,
> 
> I just a quick question for it. Does CXF has a chance to identify the
> jaxax.ws package missing import situation ?
> 
> How about throw some warning message when CXF cannot find the
> @WebService annotation when the user is using the JAXWS API to create
> the endpoint ?

No. One of the advantages of CXF over the RI is that even using the JAX-WS 
API, we don't require all the annotations.  Thus, this could break some valid 
CXF use cases.

What MAY work would be that if a valid @WebService annotation isn't found 
using the normal class.getAnnotation(WebService.class), call 
class.getAnnotations() and loop through them to see if something looks like 
@WebService, but wasn't found.   That means there are different classloaders 
in play and throw a warning then.


That said, this problem exists for the jws annotations, the JAXWS-API 
annotations, the JAXB-API annotations, XML parser api's,  etc.... 

Dan


> On 5/24/11 11:44 PM, Daniel Kulp wrote:
> > One suggestion would be from the osgi command line run "imports 52" and
> > "imports" on your application bundle and make sure the javax.ws imports
> > are being resolved from the same place.   It looks like you have two
> > bundles that
> > 
> > provide it:
> >> >  12      ACTIVE      com.springsource.javax.jws_2.0.0
> >> >  36      ACTIVE
> >> >  org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.2
> > 
> > (along with the JDK if you are on JDK 1.6)
> > 
> > And I'm wondering if there is some sort of conflict there or something
> > where your bundles may be getting a different version than the CXF
> > bundle.
> > 
> > 
> > Dan

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to