On Tuesday, August 23, 2011 3:15:36 PM Barry Hathaway wrote:
> I added those couple of lines and got the same result.
> Could part of the problem be that the stack trace is referring to
> 
> com.sun.xml.bind.v2.runtime.*
> 
> and not javax.*?


Likely not.   If the WebMethod(exclude=true) stuff was being picked up, the 
Map wouldn't be sent into JAXB and that exception wouldn't be raised.  

I'm not sure what to suggest at this point.  Can you create a testcase?


Another option that may be worth at least attempting is to try a different 
OSGi container.   You could download the Talend Service Factory from:

http://www.talend.com/download_form.php?cont=sfact&src=ResourcePage

and try deploying into there.   I've tested a bunch of CXF related things 
there so I'm pretty sure the CXF and JAXB and JAX-WS things are setup OK 
there.   If it works there but not SMX, we'll at least know there is an issue 
with the CXF in SMX setup and we can start looking deeper there.  If it 
doesn't work with Talend, then it a more fundamental issue.  


Dan



> 
> On 8/23/2011 1:44 PM, Daniel Kulp wrote:
> > The most common cause of this is to import the javax.jws annotations
> > from a different place than where CXF is importing them from.    You
> > may want to try updating your bundle's manifest to use a version like:
> > 
> > javax.jws*;version="[1.0,3)",
> > javax.xml.ws*;version="[1.0,3)",
> > 
> > etc...  to make sure you get the versioned kind and not the versions
> > exported from the JRE.   Likewise for jaxb and similar.
> > 
> > Dan
> > 
> > On Tuesday, August 23, 2011 11:33:06 AM Barry Hathaway wrote:
> >> I thought I had figured out how to exclude web service methods.
> >> In my interface file I specified:
> >> 
> >> @WebService(name="SadlService",targetNamespace="http://sadlserver.sadl
> >> .resea rch.ge.com") public interface ISadlServiceProvider {
> >> 
> >> In this file I specified a @WebMethod annotation on all the methods
> >> with
> >> the exception of
> >> getServiceNameMap() and setServiceNameMap(Map<String,String[]>
> >> serviceNameMap).
> >> 
> >> In the implementation file I specified:
> >> 
> >> @WebService(serviceName="SadlService",name="SadlService",
> >> targetNamespace="http://sadlserver.sadl.research.ge.com";,
> >> endpointInterface="com.ge.research.sadl.sadlserver.cxf.provider.ISadlS
> >> ervice Provider") public class SadlServiceProvider implements
> >> ISadlServiceProvider {
> >> 
> >> In this file I used no annotations with the exception of:
> >>       @WebMethod(exclude=true)
> >>       public Map<String,String[]>  getServiceNameMap() {
> >> 
> >> and
> >> 
> >>       @WebMethod(exclude=true)
> >>       public void setServiceNameMap(Map<String,String[]> 
> >>       serviceNameMap) {>> 
> >> Both will get called by Spring during bean creation. That is why I
> >> don't
> >> expose them.
> >> 
> >> Well this worked just fine when running CXF under Tomcat.
> >> 
> >> Now I tried to port this service to a OSGi (ServiceMix) environment.
> >> When I start the bundle
> >> it complains about those 2 excluded methods:
> >> 
> >> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2
> >> counts of IllegalAnnotationExceptions
> >> java.util.Map is an interface, and JAXB can't handle interfaces.
> >> 
> >>           this problem is related to the following location:
> >>                   at java.util.Map
> >>                   at private java.util.Map
> >> 
> >> com.ge.research.sadl.sadlserver.cxf.provider.jaxws_asm.SetServiceNameM
> >> ap.arg 0 at
> >> com.ge.research.sadl.sadlserver.cxf.provider.jaxws_asm.SetServiceNameM
> >> ap
> >> java.util.Map does not have a no-arg default constructor.
> >> 
> >>           this problem is related to the following location:
> >>                   at java.util.Map
> >>                   at private java.util.Map
> >> 
> >> com.ge.research.sadl.sadlserver.cxf.provider.jaxws_asm.SetS
> >> erviceNameMap.arg0
> >> 
> >>                   at
> >> 
> >> com.ge.research.sadl.sadlserver.cxf.provider.jaxws_asm.SetServiceNameM
> >> ap
> >> 
> >>           at
> >> 
> >> com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(
> >> Illega lAnnotationsE xception.java:102)
> >> 
> >>           at
> >> 
> >> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContext
> >> Impl.j ava:472) at
> >> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.jav
> >> a:302) at
> >> com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(J
> >> AXBCon textImpl.java
> >> 
> >> :1140)
> >> :
> >>           at
> >> 
> >> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:1
> >> 54)
> >> 
> >> Any ideas?
> >> Thanks
> >> 
> >> Barry Hathaway
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to