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 "Eran Chinthaka (JIRA)" <ji...@apache.org> on 2005/06/30 10:06:59 UTC

[jira] Created: (AXIS2-55) Children order in SOAPElements

Children order in SOAPElements
------------------------------

         Key: AXIS2-55
         URL: http://issues.apache.org/jira/browse/AXIS2-55
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: om  
    Reporter: Eran Chinthaka


All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.


-- 
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] Assigned: (AXIS2-55) Children order in SOAPElements

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

Srinath Perera reassigned AXIS2-55:
-----------------------------------

    Assign To: Eran Chinthaka

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka
>     Assignee: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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-55) Children order in SOAPElements

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

    Resolution: Fixed

Fixed with Srinath's first option.
We have getDefaultEnvelope method which comes with an Envelope with Header and Body.

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka 2
>     Assignee: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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-55) Children order in SOAPElements

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

Davanum Srinivas commented on AXIS2-55:
---------------------------------------

Am ok which ever way you want to handle it :)

thanks,
dims

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka 2
>     Assignee: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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-55) Children order in SOAPElements

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

Davanum Srinivas commented on AXIS2-55:
---------------------------------------

how about we overide addchild in soapenvelope and make sure we call insertAtBeginning if it is a soap header?

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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-55) Children order in SOAPElements

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

Srinath Perera commented on AXIS2-55:
-------------------------------------

Do you need to add Header/Body at all?

I see two ways to fix this
1) add the SOAPHeader and SOAPBody once the SOAPEnvelope is created and we do not need the add them at all. Only down side is there will be a Header element created all the time. 

2) Add the Body by default and create the Header when getHeader() called. it will add a additional if statement

If we can not fix it .. or we are redy to live with this let us colse the issue saying it. I see no point keeping this open.

Thanks
Srinath

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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: (AXIS2-55) Children order in SOAPElements

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

Eran Chinthaka updated AXIS2-55:
--------------------------------

    Fix Version: 0.91

Attaching bug to version

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka 2
>     Assignee: Eran Chinthaka
>      Fix For: 0.91

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

-- 
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-55) Children order in SOAPElements

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

Eran Chinthaka commented on AXIS2-55:
-------------------------------------

Dims, this has a small problem. If the first child of the SOAPEnvelope is a Text, then setting the SOAPHeader as the first child is not correct, IMO. This text may be just set of spaces or /n, but I think we have to preserve it. 
Plus, what do we do if user is trying to add SOAPHeader, when alreadt there is a SOAPHeader. The same argument is there for the body. 

So IMO, there is a limit, we can interfere with this. So I agree with the first option of what Srinath has suggested to have a SOAPEnvelope already filled with a SOAPHeader and SOAPBody. 

There is another idea for this, but this works only for the serialization. When we serialise we can override the serialize method of the SOAPEnvelope, so that it will first serialise the Header and then the body. But then again there is a problem with Text nodes. And this approach will not preserve the memory model. 

What do you all think about this issue ? We better agree on something before we go to the next release.

> Children order in SOAPElements
> ------------------------------
>
>          Key: AXIS2-55
>          URL: http://issues.apache.org/jira/browse/AXIS2-55
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: om
>     Reporter: Eran Chinthaka 2
>     Assignee: Eran Chinthaka

>
> All the SOAPElements uses the children methods of the OMElement. So ordering of elements are not according to the spec, if they are not added properly. For example, if one add a body and then a header to the soap envelope, the serialisation and the chidlren order within the envelope is the order it was added. Not header first and then body.

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