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 jayachandra <ja...@gmail.com> on 2005/03/18 06:57:18 UTC

[Axis2] OMElementImpl notes

Hi Axis2 Developers,

I was looking into the way adding a child in OMElementImpl was
implemented. It seems like the received OMNodeImpl object is added as
the first child and pointers are adjusted accordingly. But there seems
to be no check if there already exists a non empty OMText node already
present in this OMElement, in which case we should not allow adding a
child node (non TEXT_NODE type) as that will create ill-formed xml
message.

something like

<bodyElement>
   Hello
   <unacceptableChild> Another Hello </unacceptableChild>
</bodyElement>

is possibly accepted in our case, isn't it?

Or somewhere down the line, is this kind of check for well formedness made.
-- 
-- Jaya

Re: [Axis2] OMElementImpl notes

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
jayachandra wrote:

>True!
>my doubt should have been ill-formed SOAP message
>  
>
if you add white spaces it is allowed to have anywhere between elements 
- right?

alek

>Jaya
>
>On Fri, 18 Mar 2005 13:06:32 +0530, Venkat Reddy <vr...@gmail.com> wrote:
>  
>
>>Eran,
>>
>>I think the problem is - OMElement's addChild method is not overridden
>>anywhere in SOAP* implementations. For example OMLinkedListImplFactory
>>.getDefaultEnvelope() simply calls env.addChild(bodyImpl). I think
>>mixed content may not be allowed in SOAP message, however.
>>
>>- venkat
>>
>>On Fri, 18 Mar 2005 13:07:17 +0600, Eran Chinthaka
>><ch...@opensource.lk> wrote:
>>    
>>
>>>Mixed Content is allowed in XML. See
>>>http://www.w3.org/TR/REC-xml/#sec-mixed-content and here
>>>http://www.w3schools.com/schema/schema_complex_mixed.asp
>>>
>>>
>>>-- Chinthaka
>>>
>>>
>>>      
>>>
>>>>Hi Axis2 Developers,
>>>>
>>>>I was looking into the way adding a child in OMElementImpl was
>>>>implemented. It seems like the received OMNodeImpl object is added as
>>>>the first child and pointers are adjusted accordingly. But there seems
>>>>to be no check if there already exists a non empty OMText node already
>>>>present in this OMElement, in which case we should not allow adding a
>>>>child node (non TEXT_NODE type) as that will create ill-formed xml
>>>>message.
>>>>
>>>>something like
>>>>
>>>><bodyElement>
>>>>   Hello
>>>>   <unacceptableChild> Another Hello </unacceptableChild>
>>>></bodyElement>
>>>>
>>>>is possibly accepted in our case, isn't it?
>>>>
>>>>Or somewhere down the line, is this kind of check for well formedness
>>>>made.
>>>>--
>>>>-- Jaya
>>>>        
>>>>
>>>      
>>>
>
>
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay


Re: [Axis2] OMElementImpl notes

Posted by jayachandra <ja...@gmail.com>.
True!
my doubt should have been ill-formed SOAP message

Jaya

On Fri, 18 Mar 2005 13:06:32 +0530, Venkat Reddy <vr...@gmail.com> wrote:
> Eran,
> 
> I think the problem is - OMElement's addChild method is not overridden
> anywhere in SOAP* implementations. For example OMLinkedListImplFactory
> .getDefaultEnvelope() simply calls env.addChild(bodyImpl). I think
> mixed content may not be allowed in SOAP message, however.
> 
> - venkat
> 
> On Fri, 18 Mar 2005 13:07:17 +0600, Eran Chinthaka
> <ch...@opensource.lk> wrote:
> >
> > Mixed Content is allowed in XML. See
> > http://www.w3.org/TR/REC-xml/#sec-mixed-content and here
> > http://www.w3schools.com/schema/schema_complex_mixed.asp
> >
> >
> > -- Chinthaka
> >
> >
> > >
> > > Hi Axis2 Developers,
> > >
> > > I was looking into the way adding a child in OMElementImpl was
> > > implemented. It seems like the received OMNodeImpl object is added as
> > > the first child and pointers are adjusted accordingly. But there seems
> > > to be no check if there already exists a non empty OMText node already
> > > present in this OMElement, in which case we should not allow adding a
> > > child node (non TEXT_NODE type) as that will create ill-formed xml
> > > message.
> > >
> > > something like
> > >
> > > <bodyElement>
> > >    Hello
> > >    <unacceptableChild> Another Hello </unacceptableChild>
> > > </bodyElement>
> > >
> > > is possibly accepted in our case, isn't it?
> > >
> > > Or somewhere down the line, is this kind of check for well formedness
> > > made.
> > > --
> > > -- Jaya
> >
> >
> 


-- 
-- Jaya

Re: [Axis2] OMElementImpl notes

Posted by Venkat Reddy <vr...@gmail.com>.
Eran,

I think the problem is - OMElement's addChild method is not overridden
anywhere in SOAP* implementations. For example OMLinkedListImplFactory
.getDefaultEnvelope() simply calls env.addChild(bodyImpl). I think
mixed content may not be allowed in SOAP message, however.

- venkat


On Fri, 18 Mar 2005 13:07:17 +0600, Eran Chinthaka
<ch...@opensource.lk> wrote:
> 
> Mixed Content is allowed in XML. See
> http://www.w3.org/TR/REC-xml/#sec-mixed-content and here
> http://www.w3schools.com/schema/schema_complex_mixed.asp
> 
> 
> -- Chinthaka
> 
> 
> >
> > Hi Axis2 Developers,
> >
> > I was looking into the way adding a child in OMElementImpl was
> > implemented. It seems like the received OMNodeImpl object is added as
> > the first child and pointers are adjusted accordingly. But there seems
> > to be no check if there already exists a non empty OMText node already
> > present in this OMElement, in which case we should not allow adding a
> > child node (non TEXT_NODE type) as that will create ill-formed xml
> > message.
> >
> > something like
> >
> > <bodyElement>
> >    Hello
> >    <unacceptableChild> Another Hello </unacceptableChild>
> > </bodyElement>
> >
> > is possibly accepted in our case, isn't it?
> >
> > Or somewhere down the line, is this kind of check for well formedness
> > made.
> > --
> > -- Jaya
> 
>

RE: [Axis2] OMElementImpl notes

Posted by Eran Chinthaka <ch...@opensource.lk>.
Mixed Content is allowed in XML. See
http://www.w3.org/TR/REC-xml/#sec-mixed-content and here
http://www.w3schools.com/schema/schema_complex_mixed.asp


-- Chinthaka



> 
> Hi Axis2 Developers,
> 
> I was looking into the way adding a child in OMElementImpl was
> implemented. It seems like the received OMNodeImpl object is added as
> the first child and pointers are adjusted accordingly. But there seems
> to be no check if there already exists a non empty OMText node already
> present in this OMElement, in which case we should not allow adding a
> child node (non TEXT_NODE type) as that will create ill-formed xml
> message.
> 
> something like
> 
> <bodyElement>
>    Hello
>    <unacceptableChild> Another Hello </unacceptableChild>
> </bodyElement>
> 
> is possibly accepted in our case, isn't it?
> 
> Or somewhere down the line, is this kind of check for well formedness
> made.
> --
> -- Jaya