Bug 961560 - Allow multiple subcodes in a SOAP 1.2 fault
Allow multiple subcodes in a SOAP 1.2 fault
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services (Show other bugs)
6.1.0
Unspecified Unspecified
urgent Severity urgent
: ER5
: EAP 6.1.1
Assigned To: Emmanuel Hugonnet (ehsavoie)
https://issues.jboss.org/browse/WFLY-...
:
Depends On:
Blocks: 961561
  Show dependency treegraph
 
Reported: 2013-05-09 20:11 EDT by Kyle Lape
Modified: 2013-09-16 16:26 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 961561 (view as bug list)
Environment:
Last Closed: 2013-09-16 16:26:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 913411 None None None Never
Apache JIRA CXF-4790 None None None Never
Apache JIRA CXF-5009 None None None Never

  None (edit)
Description Kyle Lape 2013-05-09 20:11:41 EDT
Currently CXF only allows one subcode to be set via in a SoapFault object, but the SOAP 1.2 spec allows nested subcodes like so:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Body>
    <soap:Fault>
      <soap:Code>
        <soap:Value>soap:Receiver</soap:Value>
        <soap:Subcode>
          <soap:Value xmlns:ns1="http://ws.gss.redhat.com/">ns1:Error</soap:Value>
          <soap:Subcode>
            <soap:Value xmlns:ns1="http://ws.gss.redhat.com/">ns1:Failure</soap:Value>
          </soap:Subcode>
        </soap:Subcode>
      </soap:Code>
      <soap:Reason>
        <soap:Text xml:lang="en">Error by Failure</soap:Text>
      </soap:Reason>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
Comment 1 Kyle Lape 2013-05-09 21:30:07 EDT
Correction: The version of CXF in EAP 6.0.1 does not allow *any* subcode to be set.  CXF-4790 allowed one subcode to be set, but CXF-5009 is to allow multiple subcodes.  Therefore both fixes will need to be included.
Comment 2 Tadayoshi Sato 2013-05-21 21:39:19 EDT
Note that CXF-4790 will be backported by BZ-913411.
Comment 3 Kyle Lape 2013-06-13 14:46:58 EDT
This is sort of a continuation of 913411.  I wasn't sure if it would be better to make a new BZ or to just add to the 913411, so let me know if this should be closed in favor of using only 913411.
Comment 4 Emmanuel Hugonnet (ehsavoie) 2013-07-10 09:47:42 EDT
This is not an exact duplicate of #913411 as it requires the fix of another CXF bug that is currently (2013/07/10) available only in the trunk.
Comment 6 Emmanuel Hugonnet (ehsavoie) 2013-07-30 09:30:56 EDT
Upgrading to Apache CXF 2.6.9 fixes the bug.
Comment 7 Emmanuel Hugonnet (ehsavoie) 2013-07-30 10:29:28 EDT
https://github.com/jbossas/jboss-eap/pull/264
upstream
https://github.com/wildfly/wildfly/pull/4859
Comment 9 Jimmy Wilson 2013-08-01 16:17:36 EDT
@Alessio, could we not create a 2.6.8-patch01 with this fix to resolve this?  I understand the risks for 2.6.9, but is 2.6.9 our only option?
Comment 10 Alessio Soldano 2013-08-02 10:59:40 EDT
https://github.com/jboss/cxf/tree/2.6.8-jbossorg-1
Comment 15 Petr Sakař 2013-08-16 06:25:09 EDT
Verification procedure (according to https://bugzilla.redhat.com/show_bug.cgi?id=913411)

1. start AS
2. Download missingSubcode-src.zip https://bugzilla.redhat.com/attachment.cgi?id=745867
3. unzip missingSubcode-src.zip
4. cd missingSubcode.war
5. export JBOSS_HOME=jbossqe/JBEAP-6.1.1.ER6/jboss-eap-6.1
6. ant deploy
7. chmod u+x request.sh
8. ./request.sh | xmllint --format -
9. Verify response is  

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Body>
    <soap:Fault>
      <soap:Code>
        <soap:Value>soap:Receiver</soap:Value>
        <soap:Subcode>
          <soap:Value xmlns:ns1="http://ws.gss.redhat.com/">ns1:Death</soap:Value>
          <soap:Subcode>
            <soap:Value xmlns:ns1="http://ws.gss.redhat.com/">ns1:Fire</soap:Value>
          </soap:Subcode>
        </soap:Subcode>
      </soap:Code>
      <soap:Reason>
        <soap:Text xml:lang="en-US">Death by fire</soap:Text>
      </soap:Reason>
      <soap:Detail>
        <ICMSFault xmlns="http://ws.gss.redhat.com/fault"/>
      </soap:Detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>


Repeated for EAP-6.1.1.ER4, which fails - response do not contain second subcode Fire

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Body>
    <soap:Fault>
      <soap:Code>
        <soap:Value>soap:Receiver</soap:Value>
        <soap:Subcode>
          <soap:Value xmlns:ns1="http://ws.gss.redhat.com/">ns1:Death</soap:Value>
        </soap:Subcode>
      </soap:Code>
      <soap:Reason>
        <soap:Text xml:lang="en-US">Death by fire</soap:Text>
      </soap:Reason>
      <soap:Detail>
        <ICMSFault xmlns="http://ws.gss.redhat.com/fault"/>
      </soap:Detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
Comment 16 Scott Mumford 2013-08-28 23:59:45 EDT
Marking for exclusion from the 6.1.1 Release Notes document as an entry for this bug could not be completed or verified in time.

Note You need to log in before you can comment on or make changes to this bug.