Thanks, Chathura.
 
"wsdl2java -uri mtomecho.wsdl -s -ss -sd -d none" can generate the code based on AXIOM.

"wsdl2java -uri mtomecho.wsdl -s -ss -sd -d xmlbeans" can generate the Java code and many files which I don't understand.

But it throws an exception (as appended) when I the following command.
 
"-d none" seems generating very clean code. Could you please explain a little more on the difference among the three "-d" options?
 
Thanks,
tao
 
------------------------------------------------------------------------------------------------------------------------
D:\wsdl>wsdl2java -uri mtomecho.wsdl -s -ss -sd
Using AXIS2_HOME:   D:\temp\axis2-std-0.94-bin
Using JAVA_HOME:    D:\j2sdk1.4.2_05
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException
: java.lang.NullPointerException
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java :118)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilation
Exception: java.lang.NullPointerException
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp
leDBExtension.java:152)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate (CodeGener
ationEngine.java:80)
        ... 2 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPoi
nterException
        at org.apache.axis2.schema.writer.JavaBeanWriter.write (JavaBeanWriter.ja
va:143)
        at org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCompiler.ja
va:252)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:19
1)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:14
1)
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp
leDBExtension.java:104)
        ... 3 more
Caused by: java.lang.NullPointerException
        at org.apache.axis2.schema.writer.JavaBeanWriter.getBeanElement(JavaBean
Writer.java:357)
        at org.apache.axis2.schema.writer.JavaBeanWriter.process(JavaBeanWriter.
java:270)
        at org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBeanWriter.ja
va:141)
        ... 7 more
D:\wsdl>
 
====
 
I tried code generating it ran fine(Both downloading the WSDL and
giving the link as the URI). Try pasting the error with the mail.
Seemingly bad error message might ring a bell in someone's head.
Chathura

On 1/13/06, Liu, Tao <[EMAIL PROTECTED]> wrote:
> Wsdl2java [Axis2 0.94 release] throw NullPointerException when run against
> mtomecho.wsdl:
>
> http://martingudgin-2.dsl.easynet.co.uk/dotnet/mtom/mtomecho.wsdl
>
> Could you please explain why? The error message doesn't tell much.
>
> By the way, where can I find sample of WSDL for MTOM? The MTOM sample
> shipped with Axis2 0.94 doesn't contain a WSDL file, and no Java2WSDL tool
> can generate one at this time.
>
> Thanks,
> Tao
>
 

Reply via email to