Сначала я сгенерировал сервис CXF с помощью инструмента WSDL to Java из CXF или плагина Maven, а затем пытался представить сервис через mule 3 с помощью jxws-сервиса cxf следующим образом:
<flow name="SoakarService">
<!-- Public interface -->
<composite-source>
<inbound-endpoint address="http://localhost:8777/services/soakar" exchange-pattern="request-response">
<cxf:jaxws-service serviceClass="com.arcusys.soakar.soap.Soakar"/>
</inbound-endpoint>
</composite-source>
<component>
<singleton-object class="com.arcusys.soakar.soap.SoakarImpl"/>
</component>
</flow>
И вконец я постоянно получаю следующее исключение:
Exception in thread "main" org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: Flow{SoakarService}
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:236)
at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:223)
at fi.arcusys.soakar.TestMuleServer.main(TestMuleServer.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NoSuchMethodError: org.apache.cxf.common.xmlschema.SchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:177)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:398)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:444)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:682)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:507)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:202)
at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:61)
at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:159)
at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:100)
at org.mule.source.StartableCompositeMessageSource.start(StartableCompositeMessageSource.java:150)
at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:284)
at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:209)
at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:120)
at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:116)
at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
... 16 more
Я использую мул 3.2.1.Таким образом, mule-module-cxf также является 3.2.1.
Я пытался указать местоположение wsdl, но ничего не произошло, но получило то же исключение ...
Причина:
java.lang.NoSuchMethodError: org.apache.cxf.common.xmlschema.SchemaCollection.read (Lorg / w3c / dom / Document; Ljava / lang / String;) Lorg / apache / ws / commons / schema / XmlSchema;
Похоже, что-то не так с mule-module-cxf.Может быть, версия XmlSchema не имеет значения?