我正在使用cxf通过camel路由调用webservice。
骆驼路线:
....
.to("cxf:bean:UWServiceProxy")
....
我的CXF Bean条目如下 -
<cxf:cxfEndpoint id="UWServiceProxy"
address="http://sqdsql:8001/FirstGen/services/UWWebServiceProxy.UWWebServiceProxyHttpSoap11Endpoint/"
endpointName="c:UWWebServiceProxyHttpSoap11Endpoint"
serviceName="c:UWWebServiceProxy"
serviceClass="com.firstapex.pop.uw.webservices.UWWebServiceProxyPortType"
wsdlURL="http://sqdsql:8001/FirstGen/services/UWWebServiceProxy?wsdl"
xmlns:c="http://webservices.uw.pop.firstapex.com" />
但是当在Apache ServiceMix中部署模块时,我收到以下错误 -
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)[:1.6.0_27]
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)[:1.6.0_27]
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)[:1.6.0_27]
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)[:1.6.0_27]
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)[:1.6.0_27]
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)[:1.6.0_27]
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)[:1.6.0_27]
at java.lang.Class.getAnnotation(Class.java:3029)[:1.6.0_27]
at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:165)[:1.6.0_27]
at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:163)[:1.6.0_27]
at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_27]
at com.sun.xml.internal.ws.model.RuntimeModeler.getPrivClassAnnotation(RuntimeModeler.java:163)[:1.6.0_27]
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:199)[:1.6.0_27]
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:687)[:1.6.0_27]
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:675)[:1.6.0_27]
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)[:1.6.0_27]
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)[:1.6.0_27]
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)[:1.6.0_27]
at javax.xml.ws.Service.getPort(Service.java:134)[:2.2]
at com.firstapex.pop.uw.webservices.UWWebServiceProxy.getUWWebServiceProxyHttpEndpoint(UWWebServiceProxy.java:101)[305:traffic-insurance-services:1.0.0]
at com.ndfs.integration.tip.webservice.client.ATPNotificationServiceInvoker.process(ATPNotificationServiceInvoker.java:37)[305:traffic-insurance-services:1.0.0]
at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:111)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)[124:org.apache.camel.camel-core:2.13.1]
at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)[124:org.apache.camel.camel-core:2.13.1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_27]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_27]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]
我理解只有在注释有问题时才会发生异常,但是服务和端口代码是由CXF插件使用wsdl2java生成的,因此我发现这可能不是问题。请帮我解决这个问题。任何澄清的问题也将不胜感激。提前致谢。