You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michael Hagedorn <mi...@gmx.de> on 2006/01/11 14:43:46 UTC

[Axis1.3] wsdl2java generates invalid code

Hi All,

code generation terminates successfully but generated code is invalid.
Apparently something goes wrong with generated base classes.

[javac] ...\TypeNameWithno.java:18: Object() in java.lang.Object cannot
be applied to (java.lang.String)
[javac]         super(_value);
[javac]         ^

Do I miss something within my attached schema definition?

Thanks in advance
Michael




Re: [Axis1.3] wsdl2java generates invalid code

Posted by "Alex.K" <al...@gmail.com>.
Anne,

I'm developing a web service on Axis. Here is the java interface that 
I'm trying to make WSDL of it and then generating client stubs of that 
WSDL through JAVA2WSDL and WSDL2JAVA utilities.

import org.apache.axis.message.SOAPEnvelope;

public interface MyService{
 
    public SOAPEnvelope opr(SOAPEnvelope message);

}

I appreciate your help and hints.

-- Alex




Anne Thomas Manes wrote:

> Not sure why it isn't compiling, but you might try changing the base 
> type to xs:string.
>
> Anne
>
> On 1/17/06, *Michael Hagedorn* <michael.hagedorn@gmx.de 
> <ma...@gmx.de>> wrote:
>
>     Anne,
>
>     Thanks a lot for your help.
>     I have removed xs:union and this part works now.
>     Do you have an idea about what's wrong in class TypeNameWithno? This
>     class still fails to compile.
>
>     BTW, if some XML constructs are not supported an appropriate error
>     message while generating code would help a lot.
>
>     Regards,
>     Michael
>
>     Anne Thomas Manes wrote:
>
>     > Michael,
>     >
>     > I expect your problem is caused by the fact that you have an
>     > <xs:union> in your schema. I don't think Axis supports <xs:union>.
>     >
>     > Anne
>     >
>     > On 1/13/06, *Michael Hagedorn* <michael.hagedorn@gmx.de
>     <ma...@gmx.de>
>     > <mailto:michael.hagedorn@gmx.de
>     <ma...@gmx.de>>> wrote:
>     >
>     >     Me again,
>     >     attached schema and wsdl are written by myself and validating
>     >     successfully against various tools. May be some code
>     snippets I'v used
>     >     are not processible by Axis. But I'v no idea what it is.
>     Generated
>     >     classes TypeOrderSex and TypeNameWithno are not compilable.
>     >     Please, could someone take a look at it?
>     >
>     >     Thanks a lot
>     >     Michael
>     >
>     >     Michael Hagedorn wrote:
>     >
>     >     >Hi All,
>     >     >
>     >     >code generation terminates successfully but generated code is
>     >     invalid.
>     >     >Apparently something goes wrong with generated base classes.
>     >     >
>     >     >[javac] ...\TypeNameWithno.java:18: Object() in
>     java.lang.Object
>     >     cannot
>     >     >be applied to (java.lang.String)
>     >     >[javac]         super(_value);
>     >     >[javac]         ^
>     >     >
>     >     >Do I miss something within my attached schema definition?
>     >     >
>     >     >Thanks in advance
>     >     >Michael
>     >     >
>     >     >
>     >
>     >
>     >
>
>
>


Re: [Axis1.3] wsdl2java generates invalid code

Posted by Anne Thomas Manes <at...@gmail.com>.
Not sure why it isn't compiling, but you might try changing the base type to
xs:string.

Anne

On 1/17/06, Michael Hagedorn <mi...@gmx.de> wrote:
>
> Anne,
>
> Thanks a lot for your help.
> I have removed xs:union and this part works now.
> Do you have an idea about what's wrong in class TypeNameWithno? This
> class still fails to compile.
>
> BTW, if some XML constructs are not supported an appropriate error
> message while generating code would help a lot.
>
> Regards,
> Michael
>
> Anne Thomas Manes wrote:
>
> > Michael,
> >
> > I expect your problem is caused by the fact that you have an
> > <xs:union> in your schema. I don't think Axis supports <xs:union>.
> >
> > Anne
> >
> > On 1/13/06, *Michael Hagedorn* <michael.hagedorn@gmx.de
> > <ma...@gmx.de>> wrote:
> >
> >     Me again,
> >     attached schema and wsdl are written by myself and validating
> >     successfully against various tools. May be some code snippets I'v
> used
> >     are not processible by Axis. But I'v no idea what it is. Generated
> >     classes TypeOrderSex and TypeNameWithno are not compilable.
> >     Please, could someone take a look at it?
> >
> >     Thanks a lot
> >     Michael
> >
> >     Michael Hagedorn wrote:
> >
> >     >Hi All,
> >     >
> >     >code generation terminates successfully but generated code is
> >     invalid.
> >     >Apparently something goes wrong with generated base classes.
> >     >
> >     >[javac] ...\TypeNameWithno.java:18: Object() in java.lang.Object
> >     cannot
> >     >be applied to (java.lang.String)
> >     >[javac]         super(_value);
> >     >[javac]         ^
> >     >
> >     >Do I miss something within my attached schema definition?
> >     >
> >     >Thanks in advance
> >     >Michael
> >     >
> >     >
> >
> >
> >
>
>
>

Re: [Axis1.3] wsdl2java generates invalid code

Posted by Michael Hagedorn <mi...@gmx.de>.
Anne,

Thanks a lot for your help.
I have removed xs:union and this part works now.
Do you have an idea about what's wrong in class TypeNameWithno? This
class still fails to compile.

BTW, if some XML constructs are not supported an appropriate error
message while generating code would help a lot.

Regards,
Michael

Anne Thomas Manes wrote:

> Michael,
>
> I expect your problem is caused by the fact that you have an
> <xs:union> in your schema. I don't think Axis supports <xs:union>.
>
> Anne
>
> On 1/13/06, *Michael Hagedorn* <michael.hagedorn@gmx.de
> <ma...@gmx.de>> wrote:
>
>     Me again,
>     attached schema and wsdl are written by myself and validating
>     successfully against various tools. May be some code snippets I'v used
>     are not processible by Axis. But I'v no idea what it is. Generated
>     classes TypeOrderSex and TypeNameWithno are not compilable.
>     Please, could someone take a look at it?
>
>     Thanks a lot
>     Michael
>
>     Michael Hagedorn wrote:
>
>     >Hi All,
>     >
>     >code generation terminates successfully but generated code is
>     invalid.
>     >Apparently something goes wrong with generated base classes.
>     >
>     >[javac] ...\TypeNameWithno.java:18: Object() in java.lang.Object
>     cannot
>     >be applied to (java.lang.String)
>     >[javac]         super(_value);
>     >[javac]         ^
>     >
>     >Do I miss something within my attached schema definition?
>     >
>     >Thanks in advance
>     >Michael
>     >
>     >
>
>
>

Re: [Axis1.3] wsdl2java generates invalid code

Posted by Anne Thomas Manes <at...@gmail.com>.
Michael,

I expect your problem is caused by the fact that you have an <xs:union> in
your schema. I don't think Axis supports <xs:union>.

Anne

On 1/13/06, Michael Hagedorn <mi...@gmx.de> wrote:
>
> Me again,
> attached schema and wsdl are written by myself and validating
> successfully against various tools. May be some code snippets I'v used
> are not processible by Axis. But I'v no idea what it is. Generated
> classes TypeOrderSex and TypeNameWithno are not compilable.
> Please, could someone take a look at it?
>
> Thanks a lot
> Michael
>
> Michael Hagedorn wrote:
>
> >Hi All,
> >
> >code generation terminates successfully but generated code is invalid.
> >Apparently something goes wrong with generated base classes.
> >
> >[javac] ...\TypeNameWithno.java:18: Object() in java.lang.Object cannot
> >be applied to (java.lang.String)
> >[javac]         super(_value);
> >[javac]         ^
> >
> >Do I miss something within my attached schema definition?
> >
> >Thanks in advance
> >Michael
> >
> >
>
>
>

Re: [Axis1.3] wsdl2java generates invalid code

Posted by Michael Hagedorn <mi...@gmx.de>.
Me again,
attached schema and wsdl are written by myself and validating
successfully against various tools. May be some code snippets I'v used
are not processible by Axis. But I'v no idea what it is. Generated
classes TypeOrderSex and TypeNameWithno are not compilable.
Please, could someone take a look at it?

Thanks a lot
Michael

Michael Hagedorn wrote:

>Hi All,
>
>code generation terminates successfully but generated code is invalid.
>Apparently something goes wrong with generated base classes.
>
>[javac] ...\TypeNameWithno.java:18: Object() in java.lang.Object cannot
>be applied to (java.lang.String)
>[javac]         super(_value);
>[javac]         ^
>
>Do I miss something within my attached schema definition?
>
>Thanks in advance
>Michael
>  
>