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 "Gopalakrishnan (JIRA)" <ji...@apache.org> on 2005/07/19 15:22:49 UTC

[jira] Created: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
--------------------------------------------------------------------

         Key: AXIS2-81
         URL: http://issues.apache.org/jira/browse/AXIS2-81
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: core  
    Versions: 0.9    
 Environment: all
    Reporter: Gopalakrishnan


The current code has a set of parenthesis missing, which makes a valid condition fail.

 if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 

should have been

 if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .

Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

-- 
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: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

Posted by "Gopalakrishnan (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-81?page=comments#action_12316212 ] 

Gopalakrishnan commented on AXIS2-81:
-------------------------------------

Well, actually there should not be any SOAP11FaultSubCodeImpl class because SOAP 1.1 doesn't define any SubCode element for Fault. So the SOAP11FualtCodeImpl shouldn't allows us to set a subcode. i.e SOAP11FualtCodeImpl.setSubCode() can throw an java.lang.UnsupportedOperationException.

Another approach is; since SOAP 1.1 allows us extend the basic fault codes with adding '.' separated subcodes like Client.Authentication etc, we can allow SubCodes to be added (i.e SOAP11FualtCodeImpl.setSubCode()  will work properly), but when we serialize the SOA11PfaultCodeImpl object we can return it as <faultcode>Client.Authentication</faultCode>  where the SOAP11FualtCodeImpl had value "Client" and a SOAP11FaultSubCodeImpl added to it with a value "Authentication". What you think?

> SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
> --------------------------------------------------------------------
>
>          Key: AXIS2-81
>          URL: http://issues.apache.org/jira/browse/AXIS2-81
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.9
>  Environment: all
>     Reporter: Gopalakrishnan

>
> The current code has a set of parenthesis missing, which makes a valid condition fail.
>  if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 
> should have been
>  if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .
> Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
> codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

-- 
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: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-81?page=comments#action_12316213 ] 

Eran Chinthaka commented on AXIS2-81:
-------------------------------------

Remember ?? Our SOAP Programming model is SOAP 1.2 Handler authors, engine developer, etc., will write on SOAP 1.2 api, irrespective of whether the recd message is SOAP 1.1 or 1.2. 

The ""correct"" mapping will be done within the system transparent to the user. 

So argument of SOAP 1.1 doesn't have SUbCode is null and void.

> SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
> --------------------------------------------------------------------
>
>          Key: AXIS2-81
>          URL: http://issues.apache.org/jira/browse/AXIS2-81
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.9
>  Environment: all
>     Reporter: Gopalakrishnan

>
> The current code has a set of parenthesis missing, which makes a valid condition fail.
>  if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 
> should have been
>  if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .
> Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
> codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

-- 
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] Resolved: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

Posted by "Srinath Perera (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-81?page=all ]
     
Srinath Perera resolved AXIS2-81:
---------------------------------

    Resolution: Fixed

agreed that it is resolved by all

> SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
> --------------------------------------------------------------------
>
>          Key: AXIS2-81
>          URL: http://issues.apache.org/jira/browse/AXIS2-81
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.9
>  Environment: all
>     Reporter: Gopalakrishnan

>
> The current code has a set of parenthesis missing, which makes a valid condition fail.
>  if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 
> should have been
>  if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .
> Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
> codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

-- 
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: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

Posted by "Gopalakrishnan (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-81?page=comments#action_12316217 ] 

Gopalakrishnan commented on AXIS2-81:
-------------------------------------

OK. So my first argument in the previous comment is invalid, sorry about that.

I tested the implementation with fix for the paranthesis and I am getting the expected result as explained in point 2 of my last comment, so let us close this issue :)

Thanks
Gopal

> SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
> --------------------------------------------------------------------
>
>          Key: AXIS2-81
>          URL: http://issues.apache.org/jira/browse/AXIS2-81
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.9
>  Environment: all
>     Reporter: Gopalakrishnan

>
> The current code has a set of parenthesis missing, which makes a valid condition fail.
>  if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 
> should have been
>  if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .
> Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
> codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

-- 
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: (AXIS2-81) SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-81?page=comments#action_12316098 ] 

Eran Chinthaka commented on AXIS2-81:
-------------------------------------

Thanks for the if statement comment. I fixed it.

I'm not that clear about your comment on fault code. Can u please elaborate that a bit, please ?

Currently what I do is, I get the value from the subcode and print it as the text of faultcode, for SOAP 1.1. And the reference you have given is not giving me enough information :(.

Chinthaka

> SOAP11FaultSubCodeImpl.checkParent(OMElement) has wrong if condition
> --------------------------------------------------------------------
>
>          Key: AXIS2-81
>          URL: http://issues.apache.org/jira/browse/AXIS2-81
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: core
>     Versions: 0.9
>  Environment: all
>     Reporter: Gopalakrishnan

>
> The current code has a set of parenthesis missing, which makes a valid condition fail.
>  if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) 
> should have been
>  if (! ( (parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl) ) ) .
> Another enhancement suggestion is when the code has a subcode added, serialize() can serialize it as 
> codeValue.subcodeValue.  This is how subcodes have to be represented in SOAP1.1, since it doesn't define a <subcode> child element for <code> (check : http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510)

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