axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Cronce (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2290) Code generated by WSDL2Java references non-existent NMTokenHolder class
Date Sat, 05 Nov 2005 16:16:23 GMT
Code generated by WSDL2Java references non-existent NMTokenHolder class
-----------------------------------------------------------------------

         Key: AXIS-2290
         URL: http://issues.apache.org/jira/browse/AXIS-2290
     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
    Priority: Minor


It looks like when you're using document wrapped style and have more than one out or inout
parameters, Axis wants to wrap any outputted class in a "holder" class. That makes sense.

But in this case of my sample wsdl below, the code generated passes a org.apache.axis.holders.NMTokenHolder
to the AxisprobSOAPBindingImpl.problemMessage method. This causes build errors because there
is no NMTokenHolder class. There is only a TokenHolder class.

I've worked around the problem by manually editing the generated code to change the undefined
NMTokenHolder to TokenHolder classes. But it's bothersome that Axis is generating code for
classes that don't exist.

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: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


Mime
View raw message