DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15533>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15533

Java types not generated if opertion name matches element name

           Summary: Java types not generated if opertion name matches
                    element name
           Product: Axis
           Version: 1.1beta
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In my WSDL document I created a schema element, then idadvertently created an
operation with the same name. When I did this none of the schema types in the
WSDL were generated as Java types. The WSDL looks like this

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://kevinj.develop.com/AxisWSDLTestService/MathService";
    xmlns:tns="http://kevinj.develop.com/AxisWSDLTestService/MathService";
    xmlns:type="http://kevinj.develop.com/AxisWSDLTestService/MathServiceType";
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

    <wsdl:types>
        <xsd:schema
targetNamespace="http://kevinj.develop.com/AxisWSDLTestService/MathServiceType";
           
xmlns:tns="http://kevinj.develop.com/AxisWSDLTestService/MathServiceType";>
            <xsd:complexType name="AddRequestType">
                <xsd:sequence>
                    <xsd:element name="d1" type="xsd:double"/>
                    <xsd:element name="d2" type="xsd:double"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="AddResponseType">
                <xsd:sequence>
                    <xsd:element name="addReturn" type="xsd:double"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="addRequest" type="tns:AddRequestType"/>
            <xsd:element name="addResponse" type="tns:AddResponseType"/>

        </xsd:schema>


    </wsdl:types>

    <wsdl:message name="addResponse">
        <wsdl:part element="type:addResponse" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="addRequest">
        <wsdl:part element="type:addRequest" name="parameters"/>
    </wsdl:message>


    <wsdl:portType name="MathService">
        <wsdl:operation name="addRequest">
            <wsdl:input message="tns:addRequest" name="addRequest"/>
            <wsdl:output message="tns:addResponse" name="addResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MathServiceSoapBinding" type="tns:MathService">
        <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="addRequest">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="addRequest">
                <wsdlsoap:body
namespace="http://localhost/AxisWrappedTestService/services/MathService";
use="literal"/>
            </wsdl:input>
            <wsdl:output name="addResponse">
                <wsdlsoap:body
namespace="http://localhost/AxisWrappedTestService/services/MathService";
use="literal"/>
            </wsdl:output>
        </wsdl:operation>

    </wsdl:binding>
    <wsdl:service name="MathService">
        <wsdl:port binding="tns:MathServiceSoapBinding" name="MathService">
            <wsdlsoap:address
location="http://localhost/AxisWrappedTestService/services/MathService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Notice that there is an element called 'addRequest' with an operation and
corresponding binding with the same name. If you run this through WSDL2Java you
won't get any Java type definitions for the AddRequestType or AddResponseType.
However if you change the operation name to add and run the generation tool
again the correct Java is generated

Reply via email to