Hi,
I'm trying to create a web service using CXF and WSS4J that should run
inside a Felix (OSGi) instance. The WSS4J interceptors is configured using
Java.

When I try to publish the web service the following happens;

Initial attempt to crate application context was unsuccessful.
     org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from class path resource
[META-INF/cxf/cxf.xml]; nested exception is java.io.FileNotFoundException:
class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does
not exist
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
        at
org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:128)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
        at
org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
        at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
        at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
        at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
        at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
        at
org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
        at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
        at
org.apache.cxf.jaxws.spi.ProviderImpl.createEndpoint(ProviderImpl.java:73)
        at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:83)
        at javax.xml.ws.Endpoint.publish(Endpoint.java:47)
        at
mypackage.WebServiceManagerImpl$WebServicePublisher.publish(WebServiceManagerImpl.java:118)
        at
mypackage.WebServiceManagerImpl$WebServicePublisher.run(WebServiceManagerImpl.java:110)
        at java.lang.Thread.run(Unknown Source)
     Caused by: java.io.FileNotFoundException: class path
resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
        at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
        ... 23 more

After the exception is thrown it falls back to the default configuration.
The service is up and running and I can get the wsdl-description. But when I
try to invoke the methods i get an error saying EncryptedData was not
recognized.

My guess is that this is related to the exception thrown before, perhaps the
interceptors are never appropriately attached.

I am using the cxf-bundle-minimal and the following (relevant) bundles;

com.springsource.org.aopalliance-1.0.0.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.bouncycastle.jce-1.39.0.jar
com.springsource.org.dom4j-1.6.1.jar
cxf-bundle-minimal-2.2.2.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-servlet_2.5_spec-1.2.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jetty-6.1.16.jar
jetty-util-6.1.16.jar
org.apache.servicemix.bundles.asm-2.2.3_1.jar
org.apache.servicemix.bundles.fastinfoset-1.2.2_1.jar
org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar
org.apache.servicemix.bundles.neethi-2.0.4_1.jar
org.apache.servicemix.bundles.woodstox-3.2.7_1.jar
org.apache.servicemix.bundles.wsdl4j-1.6.1_1.jar
org.apache.servicemix.bundles.xalan-2.7.1_1.jar
org.apache.servicemix.bundles.xalan-serializer-2.7.1_1.jar
org.apache.servicemix.bundles.xerces-2.9.1_1.jar
org.apache.servicemix.bundles.xmlresolver-1.2_1.jar
org.apache.servicemix.bundles.xmlschema-1.4.3_1.jar
org.apache.servicemix.bundles.xmlsec-1.4.2_1.jar
org.apache.servicemix.specs.jaxb-api-2.1-1.3.0.jar
org.apache.servicemix.specs.jaxws-api-2.1-1.3.0.jar
org.apache.servicemix.specs.saaj-api-1.3-1.3.0.jar
org.apache.servicemix.specs.stax-api-1.0-1.3.0.jar
spring-aop-2.5.6.jar
spring-beans-2.5.6.jar
spring-context-2.5.6.jar
spring-core-2.5.6.jar
wss4j-1.5.7.jar

BR,
Jacob

Reply via email to