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 <[EMAIL PROTECTED]>:
> 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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> > Sent: Monday, February 27, 2006 1:49 PM
> > To: [email protected]
> > 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
>
<wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://org.apache.axis2/"; targetNamespace="http://org.apache.axis2/";><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:ns2="http://www.w3.org/2001/XMLSchema"; xmlns:ns0="http://www.w3.org/2001/XMLSchema"; xmlns:ns1="http://www.w3.org/2001/XMLSchema"; ns1:elementFormDefault="unqualified" ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd";>
<xs:element name="getVersionRequest">
<xs:complexType />
</xs:element>
<xs:element name="getVersionResponse">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="return" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></wsdl:types><wsdl:message name="getVersionResponseMessage"><wsdl:part name="part1" element="ns1:getVersionResponse" /></wsdl:message><wsdl:message name="getVersionRequestMessage"><wsdl:part name="part1" element="ns1:getVersionRequest" /></wsdl:message><wsdl:portType name="versionPort"><wsdl:operation name="getVersion"><wsdl:input message="tns:getVersionRequestMessage" /><wsdl:output message="tns:getVersionResponseMessage" /></wsdl:operation></wsdl:portType><wsdl:binding name="versionBinding" type="tns:versionPort"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"; style="document" /><wsdl:operation name="getVersion"><soap:operation soapAction="getVersion" style="document" /><wsdl:input><soap:body use="literal" namespace="http://www.org.apache.axis2"; /></wsdl:input><wsdl:output><soap:body use="literal" namespace="http://www.org.apache.axis2"; /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="version"><wsdl:port name="versionPortType" binding="tns:versionBinding"><soap:address location="http://computer.cc.columbia.edu:8080/hello-axis2/services/version"; /></wsdl:port></wsdl:service></wsdl:definitions>

Reply via email to