We have encountered this kind of exception before where a schema element was not correctly defined. Or when the complex type is not declared but used in the schema.As such wsdl2java doesn't give the detailed logs for figuring the exception directly. (Axis User pls correct if i am wrong here)
One can check the problem in the schema by removing the elements from the schema which have declared the type as Array .As the stack trace conveys . By this process one can at least check from which part of the schema does this error pop out. This is a crude way to do it. If the axis group has a better way to figure this out please let us know. -Sriram ________________________________ From: Jeffrey Schmidt <[email protected]> To: "[email protected]" <[email protected]> Sent: Thu, 5 August, 2010 2:09:22 AM Subject: RE: Axis2 wsdl2java exception problem Hello, Thanks for responding. I also thought that looked like the most ‘useful’ line of the ouput, but. . . is there some way to get wsdl2java to report what line of the wsdl file it was parsing when it encountered the error, or any other, more detailed info, about the error? I’m having some difficulty understanding what that error means. Jeff Schmidt Seapine Software, Inc. Phone: 513.701.1551 From:sri ram [mailto:[email protected]] Sent: Wednesday, August 04, 2010 4:16 PM To: [email protected] Subject: Re: Axis2 wsdl2java exception problem Hi Jeff, WSDL2java tool throws this exception mostly in cases where the Schema provided to it to compile is not valid. Check on this message provided by the stack trace. can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent sche ma urn:testtrack-interface -Sriram ________________________________ From:Jeffrey Schmidt <[email protected]> To: "[email protected]" <[email protected]> Sent: Thu, 5 August, 2010 1:33:12 AM Subject: Axis2 wsdl2java exception problem Hello, I am attempting to develop a Java client program for a SOAP-based Web Service (not written in Java), using Axis2. I want to generate client stub classes from a .wsdl file published by the web service. To do that, I’m using the following command: wsdl2java -uri http://hostname/ttsoapcgi.wsdl -d adb -s The wsdl2java program is producing the following Exceptions: Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcept ion at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224) ... 2 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) ... 3 more Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent sche ma urn:testtrack-interface at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1296) at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1258) at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1153) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1097) at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1017) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:931) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:552) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1991) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1874) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1081) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:980) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:934) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:370) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103) ... 8 more I’m trying to figure out what the errors mean. I think the last Exception indicates that wsdl2java doesn’t like something about the wsdl file, is that right? Jeff Schmidt QA Analyst Seapine Software, Inc. | Be Quality Ready 5412 Courseview Dr., Suite 200, Mason, OH 45040 Phone: 513.701.1551 | Fax: 513.754.1660 www.seapine.com Join Seapine's Agile Expedition. Learn more @ www.seapine.com/AgileExpedition
