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 "Tachtevrenidis, Kosta" <Ko...@weyerhaeuser.com> on 2006/02/27 22:47:22 UTC

RE: how to debug Axis2 WSDL2Java

Greg,
 
I have gotten that a lot too. What I do to get an idea of what is going
on is to use the wsewsdl3.exe tool to try to generate code for .NET,
which have a pretty good error message capability. Just my thoughts.
 
Kosta Tachtevrenidis 
http://www.weyer.com/dmg 
 

________________________________

From: Greg Michalopoulos [mailto:GMichalopoulos@d2hawkeye.com] 
Sent: Monday, February 27, 2006 1:49 PM
To: axis-user@ws.apache.org
Subject: how to debug Axis2 WSDL2Java


I am getting exceptions when running WSDL2Java in Axis2, is there any
way to get feedback from the application what might be wrong with my
WSDL?
 
Thanks,
Greg
 

Enumeration in WSDL

Posted by Santunu Podder <SP...@closepf.com>.
Hi all,

I have a requirement to restrict the data to contain a value from a static 
list. For e.g.

A class Employee has a member called 'Type'. I want to restrict this to 
'Permanent' or 'Contract'.

Can I achieve this in the WSDL? Will Axis automatically add these as 
enumerated list or else can we hand code this list in the WSDL generated 
by AXIS?


Thanks,
Santunu


This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.

Re: how to debug Axis2 WSDL2Java

Posted by Noah Levitt <nl...@gmail.com>.
Yep, jdk 1.5 in linux.

2006/2/28, Ajith Ranabahu <aj...@gmail.com>:
> Hi Noah,
> Hmm..this is weird. The attached WSDL is clearly wrong! However I just
> tried it and seems to be working fine here. Are you on JDK 1.5 in
> Linux ? Knowing your environment helps us to recreate the problem.
>
> Ajith
>
> On 2/28/06, Noah Levitt <nl...@gmail.com> wrote:
> > One wsdl that doesn't work is
> > http://localhost:8080/axis2/services/version?wsdl, latest axis2 from
> > svn, version.wsdl attached...
> >
> > $ java -classpath
> > lib/axis2-0.95-SNAPSHOT.jar:lib/commons-logging-1.0.4.jar:lib/axis-wsdl4j-1.2.jar:lib/XmlSchema-1.0-SNAPSHOT.jar
> > org.apache.axis2.wsdl.WSDL2Java -uri
> > 'http://localhost:8080/axis2/services/version?wsdl'
> > Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL:
> > The WSDL Types Schema does not define a targetNamespace in
> > http://localhost:8080/axis2/services/version?wsdl
> >         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)
> >         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> >         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > Invalid WSDL: The WSDL Types Schema does not define a targetNamespace
> > in http://localhost:8080/axis2/services/version?wsdl
> >         at org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:70)
> >         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)
> >         ... 2 more
> >
> > Noah
> >
> > 2006/2/27, Ajith Ranabahu <aj...@gmail.com>:
> > > Hi,
> > > I have to admit that the WSDL2Java tool has poor error messages. The
> > > primary reason for the tool to have hideous error messages is that it
> > > does no validation so far. What you can do for now is to use something
> > > like the Capeclear SOA editor to validate the WSDL.
> > > If the WSDL is valid and the codegen still complains please attach the
> > > WSDL (you might need to file a JIRA as well :)). In the meantime we'll
> > > try to make the WSDL2java error messages more meaningful.
> > >
> > > Ajith
> > >
> > > On 2/27/06, Tachtevrenidis, Kosta <Ko...@weyerhaeuser.com> wrote:
> > > >
> > > > Greg,
> > > >
> > > > I have gotten that a lot too. What I do to get an idea of what is going on
> > > > is to use the wsewsdl3.exe tool to try to generate code for .NET, which have
> > > > a pretty good error message capability. Just my thoughts.
> > > >
> > > > Kosta Tachtevrenidis
> > > > http://www.weyer.com/dmg
> > > >
> > > >
> > > >  ________________________________
> > > >  From: Greg Michalopoulos [mailto:GMichalopoulos@d2hawkeye.com]
> > > > Sent: Monday, February 27, 2006 1:49 PM
> > > > To: axis-user@ws.apache.org
> > > > Subject: how to debug Axis2 WSDL2Java
> > > >
> > > >
> > > >
> > > > I am getting exceptions when running WSDL2Java in Axis2, is there any way to
> > > > get feedback from the application what might be wrong with my WSDL?
> > > >
> > > > Thanks,
> > > > Greg
> > > >
> > >
> > >
> > > --
> > > Ajith Ranabahu
> > >
> >
> >
> >
>
>
> --
> Ajith Ranabahu
>

Re: how to debug Axis2 WSDL2Java

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Noah,
Hmm..this is weird. The attached WSDL is clearly wrong! However I just
tried it and seems to be working fine here. Are you on JDK 1.5 in
Linux ? Knowing your environment helps us to recreate the problem.

Ajith

On 2/28/06, Noah Levitt <nl...@gmail.com> wrote:
> One wsdl that doesn't work is
> http://localhost:8080/axis2/services/version?wsdl, latest axis2 from
> svn, version.wsdl attached...
>
> $ java -classpath
> lib/axis2-0.95-SNAPSHOT.jar:lib/commons-logging-1.0.4.jar:lib/axis-wsdl4j-1.2.jar:lib/XmlSchema-1.0-SNAPSHOT.jar
> org.apache.axis2.wsdl.WSDL2Java -uri
> 'http://localhost:8080/axis2/services/version?wsdl'
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL:
> The WSDL Types Schema does not define a targetNamespace in
> http://localhost:8080/axis2/services/version?wsdl
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> Invalid WSDL: The WSDL Types Schema does not define a targetNamespace
> in http://localhost:8080/axis2/services/version?wsdl
>         at org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:70)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)
>         ... 2 more
>
> Noah
>
> 2006/2/27, Ajith Ranabahu <aj...@gmail.com>:
> > Hi,
> > I have to admit that the WSDL2Java tool has poor error messages. The
> > primary reason for the tool to have hideous error messages is that it
> > does no validation so far. What you can do for now is to use something
> > like the Capeclear SOA editor to validate the WSDL.
> > If the WSDL is valid and the codegen still complains please attach the
> > WSDL (you might need to file a JIRA as well :)). In the meantime we'll
> > try to make the WSDL2java error messages more meaningful.
> >
> > Ajith
> >
> > On 2/27/06, Tachtevrenidis, Kosta <Ko...@weyerhaeuser.com> wrote:
> > >
> > > Greg,
> > >
> > > I have gotten that a lot too. What I do to get an idea of what is going on
> > > is to use the wsewsdl3.exe tool to try to generate code for .NET, which have
> > > a pretty good error message capability. Just my thoughts.
> > >
> > > Kosta Tachtevrenidis
> > > http://www.weyer.com/dmg
> > >
> > >
> > >  ________________________________
> > >  From: Greg Michalopoulos [mailto:GMichalopoulos@d2hawkeye.com]
> > > Sent: Monday, February 27, 2006 1:49 PM
> > > To: axis-user@ws.apache.org
> > > Subject: how to debug Axis2 WSDL2Java
> > >
> > >
> > >
> > > I am getting exceptions when running WSDL2Java in Axis2, is there any way to
> > > get feedback from the application what might be wrong with my WSDL?
> > >
> > > Thanks,
> > > Greg
> > >
> >
> >
> > --
> > Ajith Ranabahu
> >
>
>
>


--
Ajith Ranabahu

Re: how to debug Axis2 WSDL2Java

Posted by Noah Levitt <nl...@gmail.com>.
One wsdl that doesn't work is
http://localhost:8080/axis2/services/version?wsdl, latest axis2 from
svn, version.wsdl attached...

$ java -classpath
lib/axis2-0.95-SNAPSHOT.jar:lib/commons-logging-1.0.4.jar:lib/axis-wsdl4j-1.2.jar:lib/XmlSchema-1.0-SNAPSHOT.jar
org.apache.axis2.wsdl.WSDL2Java -uri
'http://localhost:8080/axis2/services/version?wsdl'
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL:
The WSDL Types Schema does not define a targetNamespace in
http://localhost:8080/axis2/services/version?wsdl
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
Invalid WSDL: The WSDL Types Schema does not define a targetNamespace
in http://localhost:8080/axis2/services/version?wsdl
        at org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:70)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)
        ... 2 more

Noah

2006/2/27, Ajith Ranabahu <aj...@gmail.com>:
> Hi,
> I have to admit that the WSDL2Java tool has poor error messages. The
> primary reason for the tool to have hideous error messages is that it
> does no validation so far. What you can do for now is to use something
> like the Capeclear SOA editor to validate the WSDL.
> If the WSDL is valid and the codegen still complains please attach the
> WSDL (you might need to file a JIRA as well :)). In the meantime we'll
> try to make the WSDL2java error messages more meaningful.
>
> Ajith
>
> On 2/27/06, Tachtevrenidis, Kosta <Ko...@weyerhaeuser.com> wrote:
> >
> > Greg,
> >
> > I have gotten that a lot too. What I do to get an idea of what is going on
> > is to use the wsewsdl3.exe tool to try to generate code for .NET, which have
> > a pretty good error message capability. Just my thoughts.
> >
> > Kosta Tachtevrenidis
> > http://www.weyer.com/dmg
> >
> >
> >  ________________________________
> >  From: Greg Michalopoulos [mailto:GMichalopoulos@d2hawkeye.com]
> > Sent: Monday, February 27, 2006 1:49 PM
> > To: axis-user@ws.apache.org
> > Subject: how to debug Axis2 WSDL2Java
> >
> >
> >
> > I am getting exceptions when running WSDL2Java in Axis2, is there any way to
> > get feedback from the application what might be wrong with my WSDL?
> >
> > Thanks,
> > Greg
> >
>
>
> --
> Ajith Ranabahu
>

Re: how to debug Axis2 WSDL2Java

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
I have to admit that the WSDL2Java tool has poor error messages. The
primary reason for the tool to have hideous error messages is that it
does no validation so far. What you can do for now is to use something
like the Capeclear SOA editor to validate the WSDL.
If the WSDL is valid and the codegen still complains please attach the
WSDL (you might need to file a JIRA as well :)). In the meantime we'll
try to make the WSDL2java error messages more meaningful.

Ajith

On 2/27/06, Tachtevrenidis, Kosta <Ko...@weyerhaeuser.com> wrote:
>
> Greg,
>
> I have gotten that a lot too. What I do to get an idea of what is going on
> is to use the wsewsdl3.exe tool to try to generate code for .NET, which have
> a pretty good error message capability. Just my thoughts.
>
> Kosta Tachtevrenidis
> http://www.weyer.com/dmg
>
>
>  ________________________________
>  From: Greg Michalopoulos [mailto:GMichalopoulos@d2hawkeye.com]
> Sent: Monday, February 27, 2006 1:49 PM
> To: axis-user@ws.apache.org
> Subject: how to debug Axis2 WSDL2Java
>
>
>
> I am getting exceptions when running WSDL2Java in Axis2, is there any way to
> get feedback from the application what might be wrong with my WSDL?
>
> Thanks,
> Greg
>


--
Ajith Ranabahu