Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-2881

ADB wsdl2java Code generation broken when wsdl has faults defined.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.3
    • adb
    • None

    Description

      when i run wsdl2java against the uploaded wsdl with the following command line:
      wsdl2java.bat -ss -sd -uri EmployeeRecordService.wsdl -o generated

      and then try to build the generated code, i get the following errors:
      [javac] Compiling 12 source files to C:\axis2-SNAPSHOT\emp\generated\build\classes
      [javac] C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceMessageReceiverInOut.java:63: incompatible types
      [javac] found : org.wso2.employee.EmployeeNotFoundException
      [javac] required: java.lang.Throwable
      [javac] } catch (EmployeeNotFoundException e) {
      [javac] ^
      [javac] C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceMessageReceiverInOut.java:66: createAxisFault(java.lang.Exception) in org.wso2.employee.EmployeeRecordServ
      iceServiceMessageReceiverInOut cannot be applied to (org.wso2.employee.EmployeeNotFoundException)
      [javac] org.apache.axis2.AxisFault f = createAxisFault(e);
      [javac] ^
      [javac] C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceMessageReceiverInOut.java:67: cannot find symbol
      [javac] symbol : method getFaultMessage()
      [javac] location: class org.wso2.employee.EmployeeNotFoundException
      [javac] if (e.getFaultMessage() != null){
      [javac] ^
      [javac] C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceMessageReceiverInOut.java:68: cannot find symbol
      [javac] symbol : method getFaultMessage()
      [javac] location: class org.wso2.employee.EmployeeNotFoundException
      [javac] f.setDetail(toOM(e.getFaultMessage(),false));
      [javac] ^
      [javac] C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceSkeleton.java:27: incompatible types
      [javac] found : org.wso2.employee.EmployeeNotFoundException
      [javac] required: java.lang.Throwable
      [javac] throws EmployeeNotFoundException{
      [javac] ^
      [javac] Note: C:\axis2-SNAPSHOT\emp\generated\src\org\wso2\employee\EmployeeRecordServiceServiceMessageReceiverInOut.java uses or overrides a deprecated API.
      [javac] Note: Recompile with -Xlint:deprecation for details.
      [javac] Note: Some input files use unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details.
      [javac] 5 errors

      Attachments

        1. EmployeeRecordService.wsdl
          4 kB
          Davanum Srinivas

        Activity

          People

            amilachinthaka Amila Chinthaka Suriarachchi
            dims Davanum Srinivas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: