Hi,

 I using axis 1.3.1 and the wsdl2java tool to produce both client
and server side code.  I'm running the wsdl2java tool under
windowsXP using the following options.

java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -d Application -w -t
-S true --verbose -f %WSDL_HOME%\NStoPkg.properties -o %OUTPUT_DIR%
%WSDL_HOME%\test.wsdl

 When I remove the type attribute from the "order" -> "id" element
I get a class for the SubmitOrderResponse element.  When I add the 
type attribute  to the "order" -> "id" element a class is not produced.

 I've noticed the same is I use an anyType for a type attribute.  The 
wsdl I've included is a simplified case.  In actuality, I'm importing
predefined schema into my wsdl that has this type of situation.  

 I do not have the ability to changed the imported schema.  Any explanation
and suggestions will be most welcome.

   thanks,

     Gregg


<?xml version="1.0" encoding="UTF-8" ?>

  <wsdl:definitions
        targetNamespace="urn:testservice"
        xmlns:tns="urn:testservice"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:apachesoap="http://xml.apache.org/xml-soap";
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";>
                    
    <wsdl:types>

      <xsd:schema
        targetNamespace="urn:testservice"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        version="Test_1.X">
         
        <!-- Case that produces SubmitOrderResponse class -->       
        <xsd:element name="orderId" type="xsd:string"/>

             <xsd:element name="order">
                    <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="id" minOccurs="0"/>
          </xsd:sequence>
                    </xsd:complexType>
             </xsd:element>

       <!-- Case that does not produce SubmitOrderResponse class       
             <xsd:element name="order">
                    <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="id" type="xsd:string" minOccurs="0"/>
          </xsd:sequence>
                    </xsd:complexType>
             </xsd:element>
         -->
        
        <xsd:element name="submitOrderResponse">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element ref="tns:orderId"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>

        <xsd:element name="submitOrder">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="tns:order" nillable="false"/>
              </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
      
      </xsd:schema>
      
    </wsdl:types>
    
    <wsdl:message name="submitOrderRequest">
      <wsdl:part element="tns:submitOrder" name="parameters" />
    </wsdl:message>

    <wsdl:message name="submitOrderResponse">
      <wsdl:part element="tns:submitOrderResponse" name="parameters" />
    </wsdl:message>
  
    <wsdl:portType name="TestService">
      
      <wsdl:operation name="submitOrder" parameterOrder="">
        <wsdl:input  message="tns:submitOrderRequest"
                     name="submitOrderRequest"/>
        <wsdl:output message="tns:submitOrderResponse"
                     name="submitOrderResponse"/>
      </wsdl:operation>

      
    </wsdl:portType>
  
    <wsdl:binding name="TestServiceSoapBinding" type="tns:TestService">
    
      <wsdlsoap:binding style="document"
                        transport="http://schemas.xmlsoap.org/soap/http"; />
  
      <wsdl:operation name="submitOrder">
        <wsdlsoap:operation style="document" soapAction="submitOrder" />
          <wsdl:input name="submitOrderRequest">
            <wsdlsoap:body use="literal"/>
          </wsdl:input>
        <wsdl:output name="submitOrderResponse">
          <wsdlsoap:body use="literal"/>
        </wsdl:output>
      </wsdl:operation>
    </wsdl:binding>
  
    <wsdl:service name="TestService">

      <wsdl:port binding="tns:TestServiceSoapBinding"
                 name="TestService">
        <wsdlsoap:address
          location="http://localhost/axis/services/TestService"; />
      </wsdl:port>
  
    </wsdl:service>
  
  </wsdl:definitions>

Reply via email to