[ https://issues.apache.org/activemq/browse/CAMEL-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Tam resolved CAMEL-2025. -------------------------------- Resolution: Fixed Fix Version/s: 2.1.0 Committed revision 816789. > serviceClass needs to be specified for PAYLOAD or MESSAGE mode even though > it's documented as not being required. > ----------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-2025 > URL: https://issues.apache.org/activemq/browse/CAMEL-2025 > Project: Apache Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.0.0 > Reporter: Stan Lewis > Assignee: William Tam > Fix For: 2.1.0 > > Attachments: patch.txt > > > According to http://camel.apache.org/cxf.html if you specify PAYLOAD or > MESSAGE mode you don't need to specify the serviceClass parameter if wsdlUrl > is provided. However this isn't the case, with a route like: > cxf://localhost:8080/blah?wsdlURL=classpath:hello/HelloWorld-DOC.wsdl&dataFormat=PAYLOAD > The following exception is thrown: > {code} > java.lang.IllegalArgumentException: serviceClass must be specified and not > empty > at org.apache.camel.util.ObjectHelper.notEmpty(ObjectHelper.java:271) > at > org.apache.camel.component.cxf.CxfEndpoint.createServerFactoryBean(CxfEndpoint.java:303) > at > org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:47) > at > org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:97) > at > org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:59) > at > org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:83) > at org.apache.camel.impl.RouteService.doStart(RouteService.java:94) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52) > at > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:843) > at > org.apache.camel.test.junit4.CamelTestSupport.startCamelContext(CamelTestSupport.java:147) > at > org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:100) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > {code} > as the code doesn't check what mode is being used before testing if > serviceClass is set or not. > Attached patch adds a test that reproduces this and also fixes the issue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.