Axis2
  1. Axis2
  2. AXIS2-5034

Incorrect exception name is used for fault message while creating AxisService from WSDL

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.1, 1.7.0
    • Component/s: kernel
    • Labels:

      Description

      Per the JAX-WS spec 2.5
      Conformance (Exception naming): In the absence of customizations, the name of a mapped exception
      MUST be the value of the name attribute of the wsdl:message referred to by the wsdl:fault element
      mapped according to the rules in sections 2.8 and 2.8.1.

        Activity

        Ivan created issue -
        Hide
        Ivan added a comment -

        In the attached patch, it uses the value of name attribute of the message element for the name of the AxisMessage. It looks to me that it is more straightforward than the name of the name attribute of the fault element.
        Thanks.

        Show
        Ivan added a comment - In the attached patch, it uses the value of name attribute of the message element for the name of the AxisMessage. It looks to me that it is more straightforward than the name of the name attribute of the fault element. Thanks.
        Ivan made changes -
        Field Original Value New Value
        Attachment AXIS2-5034.patch [ 12478938 ]
        Andreas Veithen made changes -
        Labels Geronimo
        Affects Version/s 1.6.0 [ 12313622 ]
        Affects Version/s 1.7.0 [ 12316136 ]
        Hide
        giovanni zigliara added a comment -

        Hi,
        this bug seem the same as mine.
        I'm upgrading from axis2 1.4.1 to 1.6.0 and the following is an extract from my wsdl:
        ...
        <xsd:element name="goofy_fault" type="tns:AbcException"></xsd:element>
        ...
        <wsdl:message name="goofy_faultMsg">
        <wsdl:part name="fault" element="tns:goofy_fault"></wsdl:part>
        </wsdl:message>
        ...
        <wsdl:operation name="goofy">
        <wsdl:input message="tns:goofyRequest"></wsdl:input>
        <wsdl:output message="tns:goofyResponse"></wsdl:output>
        <wsdl:fault name="fault" message="tns:goofy_faultMsg"></wsdl:fault>
        </wsdl:operation>
        ...

        Generating java code from wsdl definitions, the tool does not generate the *_faultMsg.java anymore ("goofy_faultMsg.java" in the extract) which are the exception messages thrown by the services, but only an "anonymous" Fault.java which is neither compatible with the existing implementation nor correct to be used with.

        Can you please tell me in which version this bug is planned to be resolved and when such version is planned to be released?
        Thanks in advance.

        Show
        giovanni zigliara added a comment - Hi, this bug seem the same as mine. I'm upgrading from axis2 1.4.1 to 1.6.0 and the following is an extract from my wsdl: ... <xsd:element name="goofy_fault" type="tns:AbcException"></xsd:element> ... <wsdl:message name="goofy_faultMsg"> <wsdl:part name="fault" element="tns:goofy_fault"></wsdl:part> </wsdl:message> ... <wsdl:operation name="goofy"> <wsdl:input message="tns:goofyRequest"></wsdl:input> <wsdl:output message="tns:goofyResponse"></wsdl:output> <wsdl:fault name="fault" message="tns:goofy_faultMsg"></wsdl:fault> </wsdl:operation> ... Generating java code from wsdl definitions, the tool does not generate the *_faultMsg.java anymore ("goofy_faultMsg.java" in the extract) which are the exception messages thrown by the services, but only an "anonymous" Fault.java which is neither compatible with the existing implementation nor correct to be used with. Can you please tell me in which version this bug is planned to be resolved and when such version is planned to be released? Thanks in advance.
        Hide
        Andreas Veithen added a comment -

        It looks like this issue is caused by the change in AXIS2-4533.

        Show
        Andreas Veithen added a comment - It looks like this issue is caused by the change in AXIS2-4533 .
        Andreas Veithen made changes -
        Assignee Andreas Veithen [ veithen ]
        Hide
        giovanni zigliara added a comment -

        Hi Andreas,
        just if the following can help:

        in effect in my wsdl I've a great number of services, let's say "goofy1",..,"goofyN", each one of this has its own fault message "goofy#_faultMsg" related to its own "goofy#_fault" element. Each one of these "goofy#_fault" elements are of the same type "AbcException".

        When i generate the java classes using the AXIS2 1.6.0 I obtain the following for the generated code: the "goofy#_faultMsg.java" classes are generated no more, all the methods in the generated Skeleton java class throws the same type of exception "Fault" (which extends Exceptions), a "Fault.java" class is generated in which a private parameter is present like the following "private goofy89_fault faultMessage;" that is the Fault exception is "tied" to one and only one "specific kind of fault message" for each service.

        I don't know if this can help.
        Regards.

        Show
        giovanni zigliara added a comment - Hi Andreas, just if the following can help: in effect in my wsdl I've a great number of services, let's say "goofy1",..,"goofyN", each one of this has its own fault message "goofy#_faultMsg" related to its own "goofy#_fault" element. Each one of these "goofy#_fault" elements are of the same type "AbcException". When i generate the java classes using the AXIS2 1.6.0 I obtain the following for the generated code: the "goofy#_faultMsg.java" classes are generated no more, all the methods in the generated Skeleton java class throws the same type of exception "Fault" (which extends Exceptions), a "Fault.java" class is generated in which a private parameter is present like the following "private goofy89_fault faultMessage;" that is the Fault exception is "tied" to one and only one "specific kind of fault message" for each service. I don't know if this can help. Regards.
        Hide
        Andreas Veithen added a comment -

        Thanks Giovanni. That confirms what I thought. I will update AXIS2-4533 with a complete analysis of why the change is bad and should never have gone into 1.6.0. I have a change ready to revert to the 1.5.x behavior and that also addresses the issue described in AXIS2-4533.

        Show
        Andreas Veithen added a comment - Thanks Giovanni. That confirms what I thought. I will update AXIS2-4533 with a complete analysis of why the change is bad and should never have gone into 1.6.0. I have a change ready to revert to the 1.5.x behavior and that also addresses the issue described in AXIS2-4533 .
        Hide
        Hudson added a comment -

        Integrated in Axis2 #916 (See https://builds.apache.org/job/Axis2/916/)
        AXIS2-5034: Implemented a fix for AXIS2-4533 that doesn't break the fault processing logic in ADB.

        veithen :
        Files :

        • /axis/axis2/java/core/trunk/modules/kernel/test-resources/wsdl/faults.wsdl
        • /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
        • /axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
        Show
        Hudson added a comment - Integrated in Axis2 #916 (See https://builds.apache.org/job/Axis2/916/ ) AXIS2-5034 : Implemented a fix for AXIS2-4533 that doesn't break the fault processing logic in ADB. veithen : Files : /axis/axis2/java/core/trunk/modules/kernel/test-resources/wsdl/faults.wsdl /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java /axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
        Hide
        Hudson added a comment -

        Integrated in Axis2 #917 (See https://builds.apache.org/job/Axis2/917/)
        AXIS2-4533 / AXIS2-5034:

        • Reverted r1072510; the faulthandling sample was actually broken by the change in AXIS2-4533.
        • Included the faulthandling sample in the build test executed by the distribution module, so that we can prevent regression.

        veithen :
        Files :

        • /axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java
        • /axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java
        • /axis/axis2/java/core/trunk/modules/distribution/pom.xml
        Show
        Hudson added a comment - Integrated in Axis2 #917 (See https://builds.apache.org/job/Axis2/917/ ) AXIS2-4533 / AXIS2-5034 : Reverted r1072510; the faulthandling sample was actually broken by the change in AXIS2-4533 . Included the faulthandling sample in the build test executed by the distribution module, so that we can prevent regression. veithen : Files : /axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java /axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java /axis/axis2/java/core/trunk/modules/distribution/pom.xml
        Hide
        Andreas Veithen added a comment -

        Fixed. Please validate with 1.7.0-SNAPSHOT, so that I can then merge the changes to the 1.6 branch for inclusion in 1.6.1.

        Show
        Andreas Veithen added a comment - Fixed. Please validate with 1.7.0-SNAPSHOT, so that I can then merge the changes to the 1.6 branch for inclusion in 1.6.1.
        Andreas Veithen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7.0 [ 12316136 ]
        Resolution Fixed [ 1 ]
        Hide
        giovanni zigliara added a comment -

        Hi Andreas, I've tried the 1.7.0-SNAPSHOT and it seems to work properly (I've tried code generation and building inside my existing implementation but I've not run it).
        My intention is to use the 1.6.1 release since it seems to me the 1.7.0 is not as stable as the 1.6.0 (maybe I'm wrong!).
        If I've well understood you're going to merge the fix in version 1.6.1, when do you thing this version will be released?
        Many thanks.

        Show
        giovanni zigliara added a comment - Hi Andreas, I've tried the 1.7.0-SNAPSHOT and it seems to work properly (I've tried code generation and building inside my existing implementation but I've not run it). My intention is to use the 1.6.1 release since it seems to me the 1.7.0 is not as stable as the 1.6.0 (maybe I'm wrong!). If I've well understood you're going to merge the fix in version 1.6.1, when do you thing this version will be released? Many thanks.
        Hide
        Hudson added a comment -

        Integrated in axis2-1.6 #72 (See https://builds.apache.org/job/axis2-1.6/72/)
        AXIS2-4533 / AXIS2-5034: Merged r1157211 and r1157265 to the 1.6 branch.

        veithen :
        Files :

        • /axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java
        • /axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/client/src/example/BankClient.java
        • /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
        • /axis/axis2/java/core/branches/1_6/modules/kernel/test-resources/wsdl/faults.wsdl
        • /axis/axis2/java/core/branches/1_6
        • /axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
        • /axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml
        Show
        Hudson added a comment - Integrated in axis2-1.6 #72 (See https://builds.apache.org/job/axis2-1.6/72/ ) AXIS2-4533 / AXIS2-5034 : Merged r1157211 and r1157265 to the 1.6 branch. veithen : Files : /axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java /axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/client/src/example/BankClient.java /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java /axis/axis2/java/core/branches/1_6/modules/kernel/test-resources/wsdl/faults.wsdl /axis/axis2/java/core/branches/1_6 /axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java /axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml
        Andreas Veithen made changes -
        Fix Version/s 1.6.1 [ 12316466 ]
        Hide
        Andreas Veithen added a comment -

        @Giovanni: 1.7.0-SNAPSHOT is built from the trunk and by definition less stable. Also, there are currently no plans for a 1.7.0 release. On the other hand, there will be a 1.6.1 release soon (it's a matter of days or a few weeks).

        Show
        Andreas Veithen added a comment - @Giovanni: 1.7.0-SNAPSHOT is built from the trunk and by definition less stable. Also, there are currently no plans for a 1.7.0 release. On the other hand, there will be a 1.6.1 release soon (it's a matter of days or a few weeks).
        Hide
        Peter Geremia added a comment -

        Hello... I just upgraded to Axis2 1.6.0 and immediately ran into the fault bug. Will the release of 1.6.1 be coming soon. If not is there a release candidate that I can use?
        Thank you for your help. -Pete

        Show
        Peter Geremia added a comment - Hello... I just upgraded to Axis2 1.6.0 and immediately ran into the fault bug. Will the release of 1.6.1 be coming soon. If not is there a release candidate that I can use? Thank you for your help. -Pete
        Hide
        Andreas Veithen added a comment -

        @Peter: release 1.6.1 is in progress. If you want, you can follow this on the developer mailing list.

        Show
        Andreas Veithen added a comment - @Peter: release 1.6.1 is in progress. If you want, you can follow this on the developer mailing list.

          People

          • Assignee:
            Andreas Veithen
            Reporter:
            Ivan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development