Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3007

WSDLServiceFactory should throw exception if the service factory cannot build the service with a wrong port name

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10
    • 2.3, 2.2.11
    • None
    • None

    Description

      When the user specify a wrong port name to build the service module from WSDLServiceFactory, we just get an empty services list from WSDLServiceBuilder.
      And user will get other exception like this

      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      	at java.util.ArrayList.get(ArrayList.java:322)
      	at org.apache.cxf.service.ServiceImpl.getName(ServiceImpl.java:67)
      	at org.apache.cxf.jaxb.JAXBDataBinding.getNamespaceToUse(JAXBDataBinding.java:432)
      	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:318)
      	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:394)
      	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:490)
      	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:240)
      	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
      	at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105)
      	at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:247)
      	at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:126)
      	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:61)
      	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75)
      	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:118)
      	at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1689)
      	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1615)
      	at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1414)
      	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1309)
      	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1208)
      	at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
      	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1186)
      	at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
      	at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
      	... 12 more
      

      The WSDLServiceFactory should check the services list and some more meaningful exception.

      Attachments

        Activity

          People

            njiang Willem Jiang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: