Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-258

serviceClass needs to be specified for PAYLOAD or MESSAGE mode even though it's documented as not being required.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.0-fuse-01-00
    • 2.2.0-fuse-01-00
    • None
    • None

      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:

      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)
      

      as the code doesn't check what mode is being used before testing if serviceClass is set or not.

            stlewis_2 Stan Lewis
            stlewis_2 Stan Lewis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: