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

dynamic client needs to handle more complex wsdl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.1
    • 2.1.3
    • Dynamic Languages
    • None
    • windows xp, jdk1.5

    Description

      when pointing the dynamic client at a more complex wsdl, the error below is seen when trying to generate the jaxb classes.

      java.lang.RuntimeException: Error compiling schema from WSDL at

      { http://localhost:8080/donkey/services/service?wsdl}

      : Two declarations cause a collision in the ObjectFactory class.
      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:409)
      at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:245)
      at com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:61)
      at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:66)
      at com.sun.tools.xjc.generator.bean.ObjectFactoryGeneratorImpl.populate(ObjectFactoryGeneratorImpl.java:150)
      at com.sun.tools.xjc.generator.bean.PublicObjectFactoryGenerator.populate(PublicObjectFactoryGenerator.java:19)
      at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:210)
      at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:151)
      at com.sun.tools.xjc.model.Model.generateCode(Model.java:226)
      at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:211)
      at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:66)
      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:166)
      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:137)
      at com.donkey.donkey.scaffold.service.DynamicService.constructClient(Dynamicervice.java:92)
      at com.donkey.donkey.scaffold.service.DynamicService.<init>(DynamicService.java:36)
      at com.donkey.donkey.scaffold.service.DynamicServiceTest.testInvoke(DynamicServiceTest.java:20)
      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 junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

      this seems to be a known issue in the jaxb component: https://jaxb.dev.java.net/guide/Dealing_with_errors.html
      whereby some form of configuration is needed to manage the collision.

      need to have a think about the best way to handle this.

      Attachments

        1. DynamicClientGenerationTest.java
          4 kB
          Marty Henderson
        2. BusinessProcessManager.wsdl
          52 kB
          Marty Henderson

        Activity

          People

            dkulp Daniel Kulp
            martyh Marty Henderson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: