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

can't publish endpoint with XmlBeans databinding when build servicemodel from class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.5, 2.2.2
    • 2.1.6, 2.2.3, 2.3
    • None
    • None

    Description

      How to reproduce:
      if we remove wsdlLocation="wsdl_systest/xmlbeans/hello_world.wsdl" from src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml and make it to generate servicemodel from class when publish endpoint with xmlbeans databinding,
      then we get exception like
      Running org.apache.cxf.systest.xmlbeans.ClientServerXmlBeansTest
      javax.xml.ws.WebServiceException: java.lang.RuntimeException: Failed to find schema for: URI_SHA_1_5949B7699D1A51AD1D8D1F0B9CDADF4C529B982D/hello_world.wsdl
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
      at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:84)
      at javax.xml.ws.Endpoint.publish(Endpoint.java:47)
      at org.apache.cxf.systest.xmlbeans.Server.run(Server.java:40)
      at org.apache.cxf.testutil.common.AbstractTestServerBase.startInProcess(AbstractTestServerBase.java:47)
      at org.apache.cxf.testutil.common.ServerLauncher.launchServer(ServerLauncher.java:175)
      at org.apache.cxf.testutil.common.AbstractClientServerTestBase.launchServer(AbstractClientServerTestBase.java:75)
      at org.apache.cxf.systest.xmlbeans.ClientServerXmlBeansTest.startServers(ClientServerXmlBeansTest.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.junit.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49)
      at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36)
      at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
      Caused by: java.lang.RuntimeException: Failed to find schema for: URI_SHA_1_5949B7699D1A51AD1D8D1F0B9CDADF4C529B982D/hello_world.wsdl
      at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.getSchema(XmlBeansSchemaInitializer.java:148)
      at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.mapClass(XmlBeansSchemaInitializer.java:200)
      at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.checkForExistence(XmlBeansSchemaInitializer.java:239)
      at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.begin(XmlBeansSchemaInitializer.java:157)
      at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:97)
      at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)
      at org.apache.cxf.xmlbeans.XmlBeansDataBinding.initialize(XmlBeansDataBinding.java:111)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:376)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:523)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:439)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:195)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)
      at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167)
      at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)
      ... 25 more
      Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:94)
      at org.apache.cxf.helpers.XMLUtils.parse(XMLUtils.java:136)
      at org.apache.cxf.xmlbeans.XmlBeansSchemaInitializer.getSchema(XmlBeansSchemaInitializer.java:129)
      ... 41 more

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: