Rather than:
Schema attributes must not be namespace qualified.(I also strongly recommend that you get in the habit of using more descriptive namespaces -- use a name that indicates the nature of the service, and preferably unique to your organization.)
ns1:elementFormDefault="qualified"
ns0:attributeFormDefault="unqualified"
As well as all the attributes within the rest of the schema, e.g., this:ns0:attributeFormDefault="unqualified"
<xs:element ns0:name="echoRequest">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:ns1="http://www.w3.org/2001/XMLSchema "
ns0:name="param0" ns1:type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Should be:<xs:complexType>
<xs:sequence>
<xs:element xmlns:ns1="http://www.w3.org/2001/XMLSchema "
ns0:name="param0" ns1:type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="echoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="param0" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
<xs:element name="param0" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Based on a quick glance through the rest of the WSDL, I didn't see any glaring errors, except that you must remove the namespace attributes from the <soap:body> definitions. e.g.; this:
<soap:body use="literal" namespace="http://www.org.apache.axis2"/>
should be this:
<soap:body use="literal"/>
(You use the namespace attribute only when using "rpc" style.)Anne
On 3/14/06,
robert lazarski <[EMAIL PROTECTED]> wrote:
The attached file is neither vaild xml or valid wsdl. Try using an xml editor - I use kxmleditor on linux - and get the file to at least load. >From there - try getting the wsdl to validate via an wsdl validator (can't recommend one at the moment, sorry).
HTH,
Robert
http://www.braziloutsource.com/On 3/14/06, Sebastian J. Schultheiss < [EMAIL PROTECTED]> wrote:Hi all,
we are playing around with the samples from the tutorial... we have extended the
MyService to take a comlpexType (a string, an int and a double) and would like
to create the client from the WSDL.
Axis has created the attached WSDL from our service, but WSDL2Java fails when
called like this:
---------------
axis2/bin# WSDL2Java -uri ..\samples\MyService.wsdl -o ..\samples\src -p
org.apache.axis2
-----------------
with this error:
--------------------------
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 file:../samples/
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: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL:
The WSDL Types Schema does not define a targetNamespace in file:../samples/
at org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage
(WSDLValidatorExtension.java:70)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:80)
... 2 more
If we try to enter anything else in the targetNamespace attribute in the WSDL,
it gives us a NullPointerException instead.
Any clues?
Thanks a lot in advance!
-- Sebi
