axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nipa dadbhawala" <nipadadbhaw...@gmail.com>
Subject Re: JAXB data binding and NPE with WSDL2Java
Date Thu, 13 Mar 2008 18:25:30 GMT
The nightly build gives me the same error with JAXB. However, now it is not
even working with the xmlbeans. I get a different error with it. Please look
at the high-lighted section It seems it does not like annotation being used
in element complexType.

$ ant
Buildfile: build.xml

compile-schema:
     [echo] Compiling the schema...
     [java] Retrieving document at
'N:\nm_ipcpm\ipcpm\webservice\uc20\Subscriber
Interface.wsdl'.
     [java] Retrieving schema at 'Common.xsd', relative to
'file:/N:/nm_ipcpm/ip
cpm/webservice/uc20/SubscriberInterface.wsdl'.
     [java] Retrieving schema at 'WS-BaseFaults-1_2.xsd', relative to
'file:/N:/
nm_ipcpm/ipcpm/webservice/uc20/Common.xsd'.
     [java] Retrieving schema at 'XML-Namespace-1998.xsd', relative to
'file:/N:
/nm_ipcpm/ipcpm/webservice/uc20/WS-BaseFaults-1_2.xsd'.
     [java] Retrieving schema at 'WS-Addressing-2005_08.xsd', relative to
'file:
/N:/nm_ipcpm/ipcpm/webservice/uc20/WS-BaseFaults-1_2.xsd'.
     [java] Retrieving schema at '
http://ossj.org/xml/Common/v1-3/OSSJ-Common-v1
-3.xsd', relative to 'file:/N:/nm_ipcpm/ipcpm/webservice/uc20/Common.xsd'.
     [java] Retrieving schema at '
http://ossj.org/xml/Common/v1-3/OSSJ-Common-v1
-3.xsd', relative to
'file:/N:/nm_ipcpm/ipcpm/webservice/uc20/SubscriberInterfac
e.wsdl'.
     [java] Retrieving schema at 'Subscriber.xsd', relative to
'file:/N:/nm_ipcp
m/ipcpm/webservice/uc20/SubscriberInterface.wsdl'.
     [java] Retrieving schema at 'Common.xsd', relative to
'file:/N:/nm_ipcpm/ip
cpm/webservice/uc20/Subscriber.xsd'.
     [java] Retrieving schema at '
http://ossj.org/xml/Common/v1-3/OSSJ-Common-v1
-3.xsd', relative to
'file:/N:/nm_ipcpm/ipcpm/webservice/uc20/Subscriber.xsd'.
     [java] 2008-03-13 11:20:42,769 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [http://ossj.org/xml/Common/v1-3]
and
 systemId [http:\ossj.org\xml\Common\v1-3\OSSJ-Common-v1-3.xsd]
     [java] 2008-03-13 11:20:43,019 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [
http://cupm.cucms.cisco.com/v1.0/Sub
scriber] and systemId [Subscriber.xsd]
     [java] 2008-03-13 11:20:43,112 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [
http://cupm.cucms.cisco.com/v1.0/Com
mon] and systemId [Common.xsd]
     [java] 2008-03-13 11:20:43,159 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [
http://cupm.cucms.cisco.com/v1.0/Com
mon] and systemId [Common.xsd]
     [java] 2008-03-13 11:20:43,191 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [
http://docs.oasis-open.org/wsrf/bf-2
] and systemId [WS-BaseFaults-1_2.xsd]
     [java] 2008-03-13 11:20:43,206 INFO
org.apache.axis2.xmlbeans.CodeGenerati
onUtility - Resolving schema with publicId [
http://www.w3.org/2005/08/addressing
] and systemId [WS-Addressing-2005_08.xsd]
     [java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerat
ionException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetExce
ption
     [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(C
odeGenerationEngine.java:278)
     [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
     [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
     [java] Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationT
argetException
     [java]     at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.eng
age(XMLBeansExtension.java:126)
     [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(C
odeGenerationEngine.java:231)
     [java]     ... 2 more
     [java] Caused by: java.lang.reflect.InvocationTargetException
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAcces
sorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMet
hodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.eng
age(XMLBeansExtension.java:115)
     [java]     ... 3 more
     [java] Caused by: java.lang.RuntimeException:
org.apache.xmlbeans.XmlExcept
ion: http://ossj.org/xml/Common/v1-3/OSSJ-Common-v1-3.xsd:298:1: error:
cvc-comp
lex-type.2.4b: Element not allowed: annotation@
http://www.w3.org/2001/XMLSchema
in element complexType@http://www.w3.org/2001/XMLSchema
     [java]     at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchema
s(CodeGenerationUtility.java:326)
     [java]     ... 8 more
     [java] Caused by: org.apache.xmlbeans.XmlException:
http://ossj.org/xml/Com
mon/v1-3/OSSJ-Common-v1-3.xsd:298:1: error: cvc-complex-type.2.4b: Element
not a
llowed: annotation@http://www.w3.org/2001/XMLSchema in element
complexType@http:
//www.w3.org/2001/XMLSchema
     [java]     at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.comp
ile(SchemaTypeSystemCompiler.java:225)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAcces
sorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMet
hodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at org.apache.xmlbeans.XmlBeans.compileXmlBeans(
XmlBeans.java:66
7)
     [java]     at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchema
s(CodeGenerationUtility.java:190)
     [java]     ... 8 more
     [java] Java Result: 1

compile-src:
     [echo] Compiling the java source files...

compile-lib:

compile-all:

BUILD SUCCESSFUL

On Thu, Mar 13, 2008 at 9:54 AM, Davanum Srinivas <davanum@gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Please try latest nightly, if that fails, please log a bug report and
> upload your wsdl/xsd's.
>
> - -- dims
>
> nipa dadbhawala wrote:
> | Hi,
> |
> | I have been trying to use WSDL2Java with *JAXB* data binding to
> | generate stubs/skeleton from WSDL and getting the following errors. I am
> | able to use the same WSDLs to generate XMLBEANS bindings successfully. I
> | have tried jaxbri which fails immediately after reading in the imported
> | files. Is there any way to find out what the problem is?
> |
> |      [java] Exception in thread "main"
> | org.apache.axis2.wsdl.codegen.CodeGenerat
> | ionException: java.lang.RuntimeException:
> | java.lang.reflect.InvocationTargetExce
> | ption
> |      [java]     at
> | org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(C
> | odeGenerationEngine.java:265)
> |      [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java
> :35)
> |      [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java
> :24)
> |      [java] Caused by: java.lang.RuntimeException:
> | java.lang.reflect.InvocationT
> | argetException
> |      [java]     at
> | org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engag
> | e(JAXBRIExtension.java:112)
> |      [java]     at
> | org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(C
> | odeGenerationEngine.java:218)
> |      [java]     ... 2 more
> |      [java] Caused by: java.lang.reflect.InvocationTargetException
> |      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> | Method)
> |      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke
> | (NativeMethodAcces
> | sorImpl.java:39)
> |      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke
> | (DelegatingMet
> | hodAccessorImpl.java:25)
> |      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
> |      [java]     at
> | org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engag
> | e(JAXBRIExtension.java:101)
> |      [java]     ... 3 more
> |      [java] Caused by: java.lang.RuntimeException:
> | java.lang.NullPointerExceptio
> | n
> |      [java]     at
> | org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(
> | CodeGenerationUtility.java:192)
> |      [java]     ... 8 more
> |      [java] Caused by: java.lang.NullPointerException
> |      [java]     at
> | org.apache.axis2.jaxbri.CodeGenerationUtility$1.resolveEntity
> | (CodeGenerationUtility.java:107)
> |      [java]     at com.sun.tools.xjc.reader.internalizer.DOMForest.parse
> | (DOMFore
> | st.java:268)
> |      [java]     at
> | com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinder
> | Impl.startElement(AbstractReferenceFinderImpl.java:78)
> |      [java]     at
> org.apache.xerces.parsers.AbstractSAXParser.startElement
> | (Unkn
> | own Source)
> |      [java]     at
> | org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElem
> | ent(Unknown Source)
> |      [java]     at
> | org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElem
> | ent(Unknown Source)
> |      [java]     at
> | org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
> | tContentDispatcher.dispatch(Unknown Source)
> |      [java]     at
> | org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc
> | ument(Unknown Source)
> |      [java]     at org.apache.xerces.parsers.XML11Configuration.parse
> (Unknown
> | So
> | urce)
> |      [java]     at org.apache.xerces.parsers.XML11Configuration.parse
> (Unknown
> | So
> | urce)
> |      [java]     at org.apache.xerces.parsers.XMLParser.parse(Unknown
> Source)
> |      [java]     at org.apache.xerces.parsers.AbstractSAXParser.parse
> (Unknown
> | Sou
> | rce)
> |      [java]     at
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse
> | (Unkn
> | own Source)
> |      [java]     at com.sun.tools.xjc.reader.internalizer.DOMForest.parse
> | (DOMFore
> | st.java:366)
> |      [java]     at com.sun.tools.xjc.reader.internalizer.DOMForest.parse
> | (DOMFore
> | st.java:246)
> |      [java]     at
> | com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema
> | (SchemaCompilerImpl.java:131)
> |      [java]     at
> | org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(
> | CodeGenerationUtility.java:161)
> |      [java]     ... 8 more
> |      [java] Java Result: 1
> |
> | compile-src:
> |      [echo] Compiling the java source files...
> |
> | compile-lib:
> |
> | Thanks,
> |
> | Nipa
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
>
> iD4DBQFH2Vw1gNg6eWEDv1kRAl3qAJjBelklK+O4RD/Qipl9f3EOTLGPAKDUORJV
> iACZu8E2MOfUkE4/zxCKiQ==
> =yKjy
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Mime
View raw message