Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Hi all,
I want to instantiate a CXF SE endpoint that uses a proxy. This proxy is configured in my CXF SE xbean and the target service is deployed by a CXF BC.
The problem may be the wsdl exposed by the BC is complex (XSD included imports other XSD)
The error happens during the spring "instantiation?", is throwed through CxfSeProxyFactoryBean and ends in org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema: with a XMLSchemaException: www.w3.org
I join the configuration files and the trace
TY for your help
Brice
<b>here are my configuration files</b>
CXFSE bean.xml:
<cxfse:endpoint>
<cxfse:pojo>
<bean class="myenterprise.com.mycxf.endpointImpl">
<property name="proxyInterface1Temp">
<cxfse:proxy service="out:externalService" interfaceName="out:externalServiceInterface1PortType" context="#context" type="myenterprise.com.out.interface" />
</property>
</bean>
</cxfse:pojo>
</cxfse:endpoint>
<cxfbc:provider wsdl="classpath:myWSDL.wsdl"
interfaceName="out:externalServiceInterface1PortType"
service="out:externalService"
endpoint="externalServiceRegistrationPort"
locationURI="http://localhost:8080/server/"
/>
<cxfbc:provider wsdl="classpath:myWSDL.wsdl"
interfaceName="out:externalServiceInterface2PortType"
service="out:externalService"
endpoint="externalServicePublisherPort"
locationURI="http://localhost:8080/server/"
/>
<cxfbc:provider wsdl="classpath:myWSDL.wsdl"
interfaceName="out:externalServiceInterface3PortType"
service="out:externalService"
endpoint="externalServiceSubscriberPort"
locationURI="http://localhost:8080/server/"
My wsdl file includes an XSDthat itself imports other XSD
<b>here is the error</b>
<loc-message>Error creating bean with name 'org.apache.servicemix.cxfse.CxfSeEndpoint' defined in file [C:\Ser
viceMix\3.3\data\smx\service-assemblies\architectureTest-cxf-sa\version_8\sus\servicemix-cxf-se\architectureTest-cxfse-System-su\xbean.xml]: Cannot create inner bean
'myenterprise.com.mycxf.endpointImpl' of type [myenterprise.com.mycxf.endpointImpl] while setting bean property 'pojo'; nested exception is org.springframework.beans.factory.BeanCr
eationException: Error creating bean with name 'myenterprise.com.mycxf.endpointImpl' defin
ed in file [C:\ServiceMix\3.3\data\smx\service-assemblies\architectureTest-cxf-sa\version_8\sus\servicemix-cxf-se\architectureTest-cxfse-System-su\xbean.xml]: Cannot
create inner bean 'cxfse:proxy#adfaec' of type [org.apache.servicemix.cxfse.CxfSeProxyFactoryBean] while setting bean property 'proxyInterface1Temp'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxfse:proxy#adfaec': FactoryBean threw except
ion on object creation; nested exception is java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: www.w3.org</loc-message>
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxfse:proxy#adfaec': FactoryBean threw exception on
object creation; nested exception is java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: www.w3.org
Caused by: java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: www.w3.org
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1886)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1902)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1627)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:175)
at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:82)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:359)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:353)
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:121)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:93)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:345)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:513)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:394)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:180)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:79)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:97)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:89)
at org.apache.servicemix.cxfse.CxfSeProxyFactoryBean.createProxy(CxfSeProxyFactoryBean.java:96)
at org.apache.servicemix.cxfse.CxfSeProxyFactoryBean.getObject(CxfSeProxyFactoryBean.java:73)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1236)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1207)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:10
99)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:215)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:10
99)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:89)
at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.apache.ws.commons.schema.XmlSchemaException: www.w3.org
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:308)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1884)
... 49 more
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>
at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
... 6 more