Hello all
I'm trying to develop a SOAP web service client into my Felix container.
For this I'm using the tool wsdl2java from Apache CXF 2.6.2. When I add my
bundle into Felix and run it, I have the next error. Can anybody help me? I
only need to develop a SOAP web service client, so I can use other tool.
Thanks in advance.
Best regards, Jesús.
18-oct-2012 10:40:58 eu.esponder.ws.CreateUpdateDeleteOperations_Service
<clinit
>
INFO: Can not initialize the default wsdl from
CreateUpdateDeleteOperations.wsdl
18-oct-2012 10:40:58
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://ws.esponder.eu/}CreateUpdateDeleteOperationsfrom
WSDL: file:/C:/felix-framework-4.0.2Lunes/CreateUpdateDeleteOperations.wsdl
org.osgi.framework.BundleException: Activator start error in bundle
bundleDBConn
ector [629].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2027)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
at org.apache.felix.gogo.command.Basic.start(Basic.java:729)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:4
03)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:89)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:4
03)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.Serv
iceConstructionException
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:332)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
at javax.xml.ws.Service.getPort(Service.java:40)
at
eu.esponder.ws.CreateUpdateDeleteOperations_Service.getCreateUpdateDe
leteOperationsPort(CreateUpdateDeleteOperations_Service.java:56)
at
com.database.bundle.bridgeDB.CreateUpdateDeleteOperations_Client.<ini
t>(CreateUpdateDeleteOperations_Client.java:55)
at com.database.bundle.Activator.start(Activator.java:34)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAct
ion.java:641)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)
... 32 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:3
39)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServ
iceFromWSDL(ReflectionServiceFactoryBean.java:432)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializ
eServiceModel(ReflectionServiceFactoryBean.java:528)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Re
flectionServiceFactoryBean.java:278)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServ
iceFactoryBean.java:179)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoi
nt(AbstractWSDLBasedEndpointFactory.java:99)
at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.ja
va:51)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFact
oryBean.java:102)
at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBe
an.java:115)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:458)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
... 39 more
Caused by: javax.xml.bind.JAXBException: Unable to create context
- with linked exception:
[java.lang.reflect.InvocationTargetException]
at javax.xml.bind.ContextFinder.find(ContextFinder.java:93)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:65)
at
org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.jav
a:562)
at
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBD
ataBinding.java:502)
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:3
22)
... 49 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:91)
... 53 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 5
counts of
IllegalAnnotationExceptions
The createIOException method has @XmlElementMapping on it, but it doesn't
return
a sub-type of JAXBElement.
this problem is related to the following location:
at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.x
ml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue= ,
substitutionHeadNamespace=##default, namespace=http://ws.esponder.eu/,
name=IOE
xception)
at public javax.xml.bind.JAXBElement
eu.esponder.ws.ObjectFactor
y.createIOException(eu.esponder.ws.IOException)
at eu.esponder.ws.ObjectFactory
The createFindCrisisDisasterWithTitleResponse method has @XmlElementMapping
on i
t, but it doesn't return a sub-type of JAXBElement.
this problem is related to the following location:
at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.x
ml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue= ,
substitutionHeadNamespace=##default, namespace=http://ws.esponder.eu/,
name=Fin
dCrisisDisasterWithTitleResponse)
at public javax.xml.bind.JAXBElement
eu.esponder.ws.ObjectFactor
y.createFindCrisisDisasterWithTitleResponse(eu.esponder.ws.FindCrisisDisasterWit
hTitleResponse)
at eu.esponder.ws.ObjectFactory
The createFindCrisisDisasterWithTitle method has @XmlElementMapping on it,
but i
t doesn't return a sub-type of JAXBElement.
this problem is related to the following location:
at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.x
ml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue= ,
substitutionHeadNamespace=##default, namespace=http://ws.esponder.eu/,
name=Fin
dCrisisDisasterWithTitle)
at public javax.xml.bind.JAXBElement
eu.esponder.ws.ObjectFactor
y.createFindCrisisDisasterWithTitle(eu.esponder.ws.FindCrisisDisasterWithTitle)
at eu.esponder.ws.ObjectFactory
The createFindCrisisDisasterFeatureWithTitle method has @XmlElementMapping
on it
, but it doesn't return a sub-type of JAXBElement.
this problem is related to the following location:
at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.x
ml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue= ,
substitutionHeadNamespace=##default, namespace=http://ws.esponder.eu/,
name=Fin
dCrisisDisasterFeatureWithTitle)
at public javax.xml.bind.JAXBElement
eu.esponder.ws.ObjectFactor
y.createFindCrisisDisasterFeatureWithTitle(eu.esponder.ws.FindCrisisDisasterFeat
ureWithTitle)
at eu.esponder.ws.ObjectFactory
The createFindCrisisDisasterFeatureWithTitleResponse method has
@XmlElementMappi
ng on it, but it doesn't return a sub-type of JAXBElement.
this problem is related to the following location:
at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.x
ml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue= ,
substitutionHeadNamespace=##default, namespace=http://ws.esponder.eu/,
name=Fin
dCrisisDisasterFeatureWithTitleResponse)
at public javax.xml.bind.JAXBElement
eu.esponder.ws.ObjectFactor
y.createFindCrisisDisasterFeatureWithTitleResponse(eu.esponder.ws.FindCrisisDisa
sterFeatureWithTitleResponse)
at eu.esponder.ws.ObjectFactory
at
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
(IllegalAnnotationsException.java:102)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContex
tImpl.java:438)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:286)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
139)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
117)
... 58 more
javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstruc
tionException
On Wed, Oct 10, 2012 at 5:56 PM, elMateo <[email protected]> wrote:
> Firstly, thanks a lot for your response.
>
> I'm using D-OSGi singlebundle-distribution, v1.2.0 into my Apache Felix,
> but I'm using Apache CXF 2.6.2 to generate the web service client from an
> external WSDL file.
>
> Is it possible that I can generate the web service client with D-OSGi
> only??
>
> Thanks
>
>
> On Wed, Oct 10, 2012 at 5:48 PM, Dascalita Dragos <[email protected]>wrote:
>
>> What distribution of Apache CXF did you get ?
>> I'm asking b/c there are 2 as per [1] , and you would get along easier if
>> you use the one OSGI dist that has all the dependencies embedded (
>> single-bundle distribution). That should get you started.
>>
>> HTH,
>> Dragos Dascalita HAut
>>
>> [1]- http://cxf.apache.org/dosgi-releases.html
>>
>>
>> On Wed, Oct 10, 2012 at 4:48 PM, elMateo <[email protected]> wrote:
>>
>> > Dear all,
>> >
>> > I need to develop a bundle that is a client of a web service. This web
>> > service is running in an Apache Tomcat server and I have the wsdl file.
>> > Also, the bundle that I'm developing has some services that export to
>> other
>> > bundles in my environment.
>> >
>> > I'm trying to develop the client with Apache CXF, but when it run, I
>> have
>> > the next error:
>> >
>> > "org.osgi.framework.BundleException: Uses constraint violation. Unable
>> to
>> > resolve
>> > bundle revision bundleDBConnector [587.0] because it is exposed to
>> package
>> > 'jav
>> > ax.xml.bind.annotation' from bundle revisions
>> > cxf-dosgi-ri-singlebundle-distribu
>> > tion [6.0] and jaxb-all.osgi [9.0] via two dependency chains.
>> >
>> > Chain 1:
>> > myBundle[587.0]
>> > import:
>> > (&(osgi.wiring.package=javax.xml.bind.annotation)(version>=2.1.0)(!(
>> > version>=3.0.0)))
>> > |
>> > export: osgi.wiring.package=javax.xml.bind.annotation
>> > cxf-dosgi-ri-singlebundle-distribution [6.0]
>> >
>> > Chain 2:
>> > myBundle [587.0]
>> > import:
>> > (&(osgi.wiring.package=javax.xml.bind)(version>=2.1.0)(!(version>=3.
>> > 0.0)))
>> > |
>> > export: osgi.wiring.package=javax.xml.bind;
>> > uses:=javax.xml.bind.annotation
>> > export: osgi.wiring.package=javax.xml.bind.annotation
>> > jaxb-all.osgi [9.0]
>> > g!
>> > "
>> >
>> > where myBundle is the bundle that I'm developing.
>> >
>> > Could anybody help me? I'm not sure about what tools I need to use to
>> > develop a web service client into Apache Felix.
>> >
>> > Thanks in advance.
>> >
>> > Jesus.
>> >
>>
>
>