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 Jarek Gawor <ga...@mcs.anl.gov> on 2004/03/24 20:05:55 UTC

Mixed content patch to BeanDeserializer

Hi,

Here's a patch to BeanDeserializer to handle mixed content. It only works
with beans that implement AnyContentType interface. Otherwise, it's just
ignored. The text between elements will be added to the MessageElement array
of AnyContentType as org.apache.axis.message.Text instances. Empty text
nodes (just with white space) are ignored and the text is trimmed. The patch
also includes a new test case. 

I hope this will be useful,
Jarek

Re: Mixed content patch to BeanDeserializer

Posted by Davanum Srinivas <di...@yahoo.com>.
plz post to JIRA (http://issues.apache.org/jira) so that we can track the changes.

thanks,
dims

--- Jarek Gawor <ga...@mcs.anl.gov> wrote:
> Hi,
> 
> Here's a patch to BeanDeserializer to handle mixed content. It only works
> with beans that implement AnyContentType interface. Otherwise, it's just
> ignored. The text between elements will be added to the MessageElement array
> of AnyContentType as org.apache.axis.message.Text instances. Empty text
> nodes (just with white space) are ignored and the text is trimmed. The patch
> also includes a new test case. 
> 
> I hope this will be useful,
> Jarek
> 

> ATTACHMENT part 2 application/octet-stream name=mixedContent.patch



=====
Davanum Srinivas - http://webservices.apache.org/~dims/

RE: Mixed content patch to BeanDeserializer

Posted by Jarek Gawor <ga...@mcs.anl.gov>.
I submitted a proposed patch for this issue. It basically works the same as
for any type. The JavaBeanWriter will generate the set_any()/get_any()
methods just like for AnyContentType but under a new interface called
MixedContentType. This allows to distinguish between beans with mixed
content, beans with any element content, and beans with mixed and any
element content. One issue with this feature is that basic MixedContentType
beans do not actually enforce Text-only nodes. But I think this could be
improved later on in the serialization/deserialization code.

Jarek

> -----Original Message-----
> From: Davanum Srinivas [mailto:dims@yahoo.com] 
> Sent: Wednesday, March 24, 2004 6:50 PM
> To: axis-dev@ws.apache.org
> Cc: gawor@mcs.anl.gov
> Subject: Re: Mixed content patch to BeanDeserializer
> 
> 
> Jarek,
> 
> is it easy to fix this as well? 
> http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1170
> 
> -- dims
> 
> --- Jarek Gawor <> wrote:
> > Hi,
> > 
> > Here's a patch to BeanDeserializer to handle mixed content. It only 
> > works with beans that implement AnyContentType interface. 
> Otherwise, 
> > it's just ignored. The text between elements will be added to the 
> > MessageElement array of AnyContentType as 
> org.apache.axis.message.Text 
> > instances. Empty text nodes (just with white space) are ignored and 
> > the text is trimmed. The patch also includes a new test case.
> > 
> > I hope this will be useful,
> > Jarek
> > 
> 
> > ATTACHMENT part 2 application/octet-stream name=mixedContent.patch
> 
> 
> 
> =====
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> 


Re: Mixed content patch to BeanDeserializer

Posted by Davanum Srinivas <di...@yahoo.com>.
Jarek,

is it easy to fix this as well?
http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1170

-- dims

--- Jarek Gawor <> wrote:
> Hi,
> 
> Here's a patch to BeanDeserializer to handle mixed content. It only works
> with beans that implement AnyContentType interface. Otherwise, it's just
> ignored. The text between elements will be added to the MessageElement array
> of AnyContentType as org.apache.axis.message.Text instances. Empty text
> nodes (just with white space) are ignored and the text is trimmed. The patch
> also includes a new test case. 
> 
> I hope this will be useful,
> Jarek
> 

> ATTACHMENT part 2 application/octet-stream name=mixedContent.patch



=====
Davanum Srinivas - http://webservices.apache.org/~dims/