You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "David Wong (JIRA)" <ax...@ws.apache.org> on 2005/08/25 21:00:12 UTC

[jira] Created: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
------------------------------------------------------------------------------------------

         Key: AXIS-2195
         URL: http://issues.apache.org/jira/browse/AXIS-2195
     Project: Apache Axis
        Type: Bug
    Versions: 1.2.1    
 Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
    Reporter: David Wong


I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:

java.io.Serializable
        |
        org.xmlsoap.schemas.wsdl.TExtensibilityElement
                  |
                  org.xmlsoap.schemas.wsdl.soap.TBody
                           |
                           org.xmlsoap.schemas.wsdl.soap.TFaultRes
                                   |
                                   org.xmlsoap.schemas.wsdl.soap.TFault

Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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


[jira] Updated: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

Posted by "David Wong (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2195?page=all ]

David Wong updated AXIS-2195:
-----------------------------

    Attachment: src.zip

The source that was generated from the attached WSDL.

> WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
> ------------------------------------------------------------------------------------------
>
>          Key: AXIS-2195
>          URL: http://issues.apache.org/jira/browse/AXIS-2195
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
>     Reporter: David Wong
>  Attachments: AgencyIntegrationServices-V1.0.wsdl, src.zip
>
> I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:
> java.io.Serializable
>         |
>         org.xmlsoap.schemas.wsdl.TExtensibilityElement
>                   |
>                   org.xmlsoap.schemas.wsdl.soap.TBody
>                            |
>                            org.xmlsoap.schemas.wsdl.soap.TFaultRes
>                                    |
>                                    org.xmlsoap.schemas.wsdl.soap.TFault
> Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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


[jira] Commented: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

Posted by "Venkat Reddy (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2195?page=comments#action_12320520 ] 

Venkat Reddy commented on AXIS-2195:
------------------------------------

I don't think you will ever need to generate a class like TFault.

1. The last two imports in your wsdl may be not required. Its enough if you add a namespace for these schemas.
2. The <wsdl:part name="ErrorMessage" element="soap:fault"/> might need to refer to a element type definition instead of "soap:fault".

- venkat

> WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
> ------------------------------------------------------------------------------------------
>
>          Key: AXIS-2195
>          URL: http://issues.apache.org/jira/browse/AXIS-2195
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
>     Reporter: David Wong
>  Attachments: AgencyIntegrationServices-V1.0.wsdl, src.zip
>
> I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:
> java.io.Serializable
>         |
>         org.xmlsoap.schemas.wsdl.TExtensibilityElement
>                   |
>                   org.xmlsoap.schemas.wsdl.soap.TBody
>                            |
>                            org.xmlsoap.schemas.wsdl.soap.TFaultRes
>                                    |
>                                    org.xmlsoap.schemas.wsdl.soap.TFault
> Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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


[jira] Updated: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

Posted by "David Wong (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2195?page=all ]

David Wong updated AXIS-2195:
-----------------------------

    Attachment: AgencyIntegrationServices-V1.0.wsdl

The WSDL file that I used.

> WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
> ------------------------------------------------------------------------------------------
>
>          Key: AXIS-2195
>          URL: http://issues.apache.org/jira/browse/AXIS-2195
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
>     Reporter: David Wong
>  Attachments: AgencyIntegrationServices-V1.0.wsdl
>
> I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:
> java.io.Serializable
>         |
>         org.xmlsoap.schemas.wsdl.TExtensibilityElement
>                   |
>                   org.xmlsoap.schemas.wsdl.soap.TBody
>                            |
>                            org.xmlsoap.schemas.wsdl.soap.TFaultRes
>                                    |
>                                    org.xmlsoap.schemas.wsdl.soap.TFault
> Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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


[jira] Commented: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

Posted by "David Wong (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2195?page=comments#action_12323066 ] 

David Wong commented on AXIS-2195:
----------------------------------

I think we can just catch the RemoteException and rethrow it as an AxisFault.  Thanks for the help.  I think you can close this issue now.  However, I am still curious as to why the original behavior is 1.1 has changed.

> WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
> ------------------------------------------------------------------------------------------
>
>          Key: AXIS-2195
>          URL: http://issues.apache.org/jira/browse/AXIS-2195
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
>     Reporter: David Wong
>  Attachments: AgencyIntegrationServices-V1.0.wsdl, src.zip
>
> I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:
> java.io.Serializable
>         |
>         org.xmlsoap.schemas.wsdl.TExtensibilityElement
>                   |
>                   org.xmlsoap.schemas.wsdl.soap.TBody
>                            |
>                            org.xmlsoap.schemas.wsdl.soap.TFaultRes
>                                    |
>                                    org.xmlsoap.schemas.wsdl.soap.TFault
> Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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


[jira] Commented: (AXIS-2195) WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.

Posted by "David Wong (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2195?page=comments#action_12323065 ] 

David Wong commented on AXIS-2195:
----------------------------------

Thank you Venkat.  Removing the "soap:fault" solved the problem.  Now it's just throwing a custom AxisFault.  What should we put in the WSDL if we wanted the generated code to throw a plain old  AxisFault instead.  Removing the <wsdl:fault/> element generates a binding impl that just throws a RemoteException?

In Axis 1.1, using the WSDL with the "soap:fault," WSDL2Java generated a binding impl that threw both a remote exception and a TFault object.  Was this incorrect behavior in version 1.1?

> WSDL2Java generates a org.xmlsoap.schemas.wsdl.soap.TFault object that is not a Throwable.
> ------------------------------------------------------------------------------------------
>
>          Key: AXIS-2195
>          URL: http://issues.apache.org/jira/browse/AXIS-2195
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Windows XP, "Apache Axis 1.2.1 Final ChangeLog (Changes after 1.2 Final)"
>     Reporter: David Wong
>  Attachments: AgencyIntegrationServices-V1.0.wsdl, src.zip
>
> I am also having compilation problems with version 1.2 wsdl2java generated code. Wsdl2java generates a soap binding impl class that has methods which throw a org.xmlsoap.schemas.wsdl.soap.TFault object. The TFault object generated has the following inheritance heirarchy:
> java.io.Serializable
>         |
>         org.xmlsoap.schemas.wsdl.TExtensibilityElement
>                   |
>                   org.xmlsoap.schemas.wsdl.soap.TBody
>                            |
>                            org.xmlsoap.schemas.wsdl.soap.TFaultRes
>                                    |
>                                    org.xmlsoap.schemas.wsdl.soap.TFault
> Since this heirarchy does not include a Throwable, the compiler will error out and tell you that you are trying to throw something that is not throwable. The WSDL that I am using works with Axis 1.1 and in that version, TFaultRes is inherited from AxisFault which is a RemoteException. I am attaching the WSDL file I used (AgencyIntegrationServices-V1.0.wsdl) to this issue.

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