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=15958>.
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=15958

WSDL2Java generates bad stub when service class uses methods with excpetions

           Summary: WSDL2Java generates bad stub when service class uses
                    methods with excpetions
           Product: Axis
           Version: 1.1beta
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: WSDL processing
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Try to generate stubs using wsdl2Java and the following WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://simple2.service.datev.de"; 
xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://simple2.service.datev.de"; 
xmlns:intf="http://simple2.service.datev.de"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
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><schema 
targetNamespace="http://simple2.service.datev.de"; 
xmlns="http://www.w3.org/2001/XMLSchema";><import 
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType 
name="MyException23"><sequence/></complexType><element name="MyException23" 
nillable="true" type="impl:MyException23"/></schema></wsdl:types>
  <wsdl:message name="MyException">
    <wsdl:part name="fault" type="intf:MyException23"/>
  </wsdl:message>
  <wsdl:message name="tuWasResponse">
  </wsdl:message>
  <wsdl:message name="tuWasRequest">
    <wsdl:part name="parm" type="xsd:string"/>
  </wsdl:message>
  <wsdl:portType name="SimpleService2">
    <wsdl:operation name="tuWas" parameterOrder="parm">
      <wsdl:input message="intf:tuWasRequest" name="tuWasRequest"/>
      <wsdl:output message="intf:tuWasResponse" name="tuWasResponse"/>
      <wsdl:fault message="intf:MyException" name="MyException"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SimpleService2SoapBinding" type="intf:SimpleService2">
    <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="tuWas">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="tuWasRequest">
        <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="http://simple2.service.datev.de"; use="encoded"/>
      </wsdl:input>
      <wsdl:output name="tuWasResponse">
        <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="http://simple2.service.datev.de"; use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SimpleService2Service">
    <wsdl:port binding="intf:SimpleService2SoapBinding" name="SimpleService2">
      <wsdlsoap:address 
location="http://localhost:8080/nuko/services/SimpleService2"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


The generated stub looks like:

package de.datev.service.simple2;

public interface SimpleService2 extends java.rmi.Remote {
    public void tuWas(java.lang.String parm) throws java.rmi.RemoteException, 
null;
}

Watch for the "null" as an Exception-Type!
Using Axis 1.0 everything worked fine.

Reply via email to