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

local part cannot be "null" when creating a QName

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.7
    • Fix Version/s: 2.5.7, 2.6.4, 2.7.1
    • Component/s: OtherDatabindings
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      We have a webservice using xmlbeans for the databinding. The webservice has a method taking the xml document generated by xmlbeans. It works fine with version 2.2.11 and 2.3.9.
      Now, we would like to migrate this to the new version 2.7.0, but the webservice can't be created anymore due to this exception:

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localWebServiceClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
              at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
              at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1440)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:247)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)
              ... 32 more
      Caused by: java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
              at javax.xml.namespace.QName.<init>(QName.java:246)
              at javax.xml.namespace.QName.<init>(QName.java:190)
              at org.apache.ws.commons.schema.utils.XmlSchemaNamedWithFormImpl.setName(XmlSchemaNamedWithFormImpl.java:87)
              at org.apache.ws.commons.schema.XmlSchemaElement$2.run(XmlSchemaElement.java:230)
              at org.apache.ws.commons.schema.utils.CollectionFactory.withSchemaModifiable(CollectionFactory.java:123)
              at org.apache.ws.commons.schema.XmlSchemaElement.setName(XmlSchemaElement.java:225)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createWrappedMessageSchema(ReflectionServiceFactoryBean.java:1306)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createWrappedSchema(ReflectionServiceFactoryBean.java:1136)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWrappedSchema(ReflectionServiceFactoryBean.java:1034)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:478)
              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536)
              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248)
              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
              at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
              at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
              at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
              at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
              at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.create(JaxWsProxyFactoryBeanDefinitionParser.java:79)
              at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:83)
              at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
              ... 40 more
      

      I will attach a maven project reproducing the problem. Just change the cxf version in the pom.xml to 2.3.9 to make it working...

        Attachments

        1. ws-test.zip
          9 kB
          Thomas Schurins

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              tsc Thomas Schurins
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: