2 Replies Latest reply: Jun 1, 2011 4:47 PM by GregorM RSS

    JAXB mapping error on WSDL

    GregorM
      Hi.

      I have a problem creating web service proxy in JDeveloper using particular WSDL. As I have deeply explored the cause of an error I found the complexType by name "objectFactory" inside WSDL which is mapped by JAXB to ObjectFactory object. So the tag inside WSDL file is :

      <xs:complexType name="objectFactory"><xs:sequence/></xs:complexType>

      And that is causing the error described below. Now the problem is ObjectFactory is also a name for object definition inside Java.

      Hope I was clear enough. Is there a way to avoid this situation?


      The error I get when creating web service proxy is


      oracle.jdeveloper.webservices.model.WebServiceException: Error creating model from wsdl "file:/C:/temp/testVirWs.wsdl": null
           at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1635)
           at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2846)
           at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2611)
           at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:509)
           at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:461)
           at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy$ProxyJavaWebService.<init>(WebServiceProxy.java:2268)
           at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.updateServiceModel(WebServiceProxy.java:1701)
           at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.setDescription(WebServiceProxy.java:525)
           at oracle.jdevimpl.webservices.wizard.jaxrpc.proxy.ProxyJaxWsSpecifyWSDLPanel.setDescription(ProxyJaxWsSpecifyWSDLPanel.java:238)
           at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.buildModel(SpecifyWsdlPanel.java:1109)
           at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$5.run(SpecifyWsdlPanel.java:661)
           at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "file:/C:/temp/testVirWs.wsdl": null
           at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.newWsdlValidationException(WsaAdaptor.java:825)
           at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:515)
           at oracle.jdeveloper.webservices.tools.WebServiceTools.getSeiInfo(WebServiceTools.java:523)
           at oracle.jdeveloper.webservices.model.java.JavaWebService.getSeiInfo(JavaWebService.java:1741)
           at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1496)
           ... 12 more
      Caused by: oracle.j2ee.ws.common.tools.api.ValidationException: Error creating model from wsdl "file:/C:/temp/testVirWs.wsdl": null
           at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:679)
           at oracle.j2ee.ws.tools.wsa.WsdlToJavaTool.createJAXWSModel(WsdlToJavaTool.java:478)
           at oracle.j2ee.ws.tools.wsa.Util.getJaxWsSeiInfo(Util.java:1360)
           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:597)
           at oracle.jdevimpl.webservices.tools.wsa.Assembler$2$1.invoke(Assembler.java:218)
           at $Proxy36.getJaxWsSeiInfo(Unknown Source)
           at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:505)
           ... 15 more
      Caused by: java.lang.NullPointerException
           at com.sun.tools.xjc.util.Util.equals(Util.java:67)
           at com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:130)
           at com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:77)
           at com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(ImplStructureStrategy.java:78)
           at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGenerator.java:410)
           at com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.java:442)
           at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:209)
           at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:182)
           at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
           at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:252)
           at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
           at oracle.j2ee.ws.common.tools.databinding.jaxb20.JAXB20TypeGenerator.generateJavaTypes(JAXB20TypeGenerator.java:121)
           at oracle.j2ee.ws.tools.wsa.SchemaTool.genValueTypes(SchemaTool.java:186)
           at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:662)
           ... 24 more


      Any suggestion appreciated. Thanks.