WSDL2Java error with wsdl that references "xml:specialAttrs"
------------------------------------------------------------
Key: AXIS-2289
URL: http://issues.apache.org/jira/browse/AXIS-2289
Project: Apache Axis
Type: Bug
Components: WSDL processing
Versions: 1.3
Environment: Mac OS X 10.4.3, java full version "1.4.2_09-232"
Reporter: Allen Cronce
When I use the Axis 1.3 WSDL2Java to generate the server side classes, I get
the following error:
Parsing XML file: axisprob.wsdl
java.io.IOException: Type specialAttrs is referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:552)
The issue that that WSDL2Java's got a problem with specialAttrs, which is an
attribute group defined by the w3c. I'm importing the xml.xsd schema where
specialAttrs is defined.
When I previously generated code with Axis 1.1, this error did not happen.
Further, other validation tools think that the wsdl is fine.
Here's a sample wsdl that reproduces the problem:
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="axisprob.wsdl"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdlns="axisprob.wsdl"
xmlns:xsdns="axisprob.xsd">
<!-- Imports -->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<types>
<xs:schema targetNamespace="axisprob.xsd" xmlns:xsdns="axisprob.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!-- Types -->
<!-- TextType -->
<xs:complexType name="TextType" mixed="true">
<xs:annotation>
<xs:documentation xml:lang="en"> This is a type definition
for generic text in
XML. For maintenance reasons, it is preferable to use
something like this
rather than the built-in datatype string, unless you
have an absolute
requirement to use a simple datatype. </xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"
processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="xml:specialAttrs"/>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<!-- GUIDType -->
<xs:simpleType name="GUIDType">
<xs:annotation>
<xs:documentation xml:lang="en"> This is a type definition
for globally unique
identifiers. </xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN">
<xs:pattern
value="[0-9,A-F,a-f]{8}-[0-9,A-F,a-f]{4}-[0-9,A-F,a-f]{4}-[0-9,A-F,a-f]{4}-[0-9,A-F,a-f]{12}"
/>
</xs:restriction>
</xs:simpleType>
<!-- RecordReferenceType -->
<xs:simpleType name="RecordReferenceType">
<xs:annotation>
<xs:documentation xml:lang="en"> This is a type definition
for globally unique
identifiers. </xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN"> </xs:restriction>
</xs:simpleType>
<!-- Methods signatures -->
<!-- problemMessage -->
<xs:element name="problemMessage">
<xs:annotation>
<xs:documentation xml:lang="en"> NEEDS COMMENT
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="customerGUID" type="xsdns:GUIDType"/>
<xs:element name="customerReference"
type="xsdns:TextType" minOccurs="0"
maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- problemMessageResponse -->
<xs:element name="problemMessageResponse">
<xs:annotation>
<xs:documentation xml:lang="en"> NEEDS COMMENT
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="transactionRecordReference"
type="xsdns:RecordReferenceType"/>
<xs:element name="customerReference"
type="xsdns:TextType" minOccurs="0"
maxOccurs="1"/>
<xs:element name="guid" type="xsdns:GUIDType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<!-- Messages -->
<!-- problemMessage message -->
<message name="problemMessage">
<part name="parameters" element="xsdns:problemMessage"/>
</message>
<message name="problemMessageResponse">
<part name="parameters" element="xsdns:problemMessageResponse"/>
</message>
<!-- Port type -->
<portType name="axisprobPortType">
<!-- problemMessage -->
<operation name="problemMessage">
<input message="wsdlns:problemMessage"/>
<output message="wsdlns:problemMessageResponse"/>
</operation>
</portType>
<!-- Binding for axisprob Web APIs - Document style, SOAP over HTTP -->
<binding name="axisprobSOAPBinding" type="wsdlns:axisprobPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<!-- problemMessage -->
<operation name="problemMessage">
<soap:operation soapAction="urn:axisprob2Action"/>
<input>
<soap:body use="literal" namespace="axisprob.wsdl"/>
</input>
<output>
<soap:body use="literal" namespace="axisprob.wsdl"/>
</output>
</operation>
</binding>
<!-- Endpoint for axisprob Web APIs -->
<service name="axisprob2">
<port name="axisprobPortType" binding="wsdlns:axisprobSOAPBinding">
<soap:address
location="http://localhost:4310/WebObjects/axisprob2.woa/wa/axisprob2"/>
</port>
</service>
</definitions>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira