[ 
http://issues.apache.org/jira/browse/AXIS2-931?page=comments#action_12433957 ] 
            
Derek Foster commented on AXIS2-931:
------------------------------------

Thanks for fixing this!

> WSDL2Java generated fault exceptions don't provide a way to specify an 
> exception message or cause.
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-931
>                 URL: http://issues.apache.org/jira/browse/AXIS2-931
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>            Reporter: Derek Foster
>         Assigned To: Eran Chinthaka
>            Priority: Blocker
>         Attachments: patch_exception_constructor.txt
>
>
> When WSDL2Java is run for the latest nightly build, generating XMLBeans code, 
>  the exception classes that are being generated for WSDL faults do not have 
> any declared constructors. As a result, it is impossible to specify any kind 
> of message (for debugging purposes, etc.) except by using the setFaultMessage 
> method.
> The currently generated code looks like this:
>     /**
>      *  FServiceSkeletonInterface java skeleton interface for the axisService
>      */
>     public interface FServiceSkeletonInterface {
>      
>                
>         /**
>          * Auto generated method signature
>          */
>         public  crc.Fimport.xmlbeans.wsdl.ReturnDocument acceptFEvent
>         (
>           crc.Fimport.xmlbeans.F.FullEventUpdateDocument param4     
>          )
>          
>            throws 
> crc.Fimport.wsdl2java.FServiceSkeletonInterface.FailureException;
>      
>          public static class FailureException extends 
> java.rmi.RemoteException{
>             private crc.Fimport.xmlbeans.wsdl.FailureDocument faultMessage;
>             public void 
> setFaultMessage(crc.Fimport.xmlbeans.wsdl.FailureDocument msg){
>                faultMessage = msg;
>             }
>             public crc.Fimport.xmlbeans.wsdl.FailureDocument 
> getFaultMessage(){
>                return faultMessage;
>             }
>          }
>    
>          }
> However, I think that at a minimum, two additional constructors should be 
> provided to class FailureException:
> FailureException(String message)
> {
>    super(message);
> }
> FailureException(String message, Throwable cause)
> {
>   super(message, cause);
> }

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to