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 Deepak Vishwakarma <vd...@yahoo.co.in> on 2008/08/12 14:39:11 UTC

How can I configure AXIS2 so that it does not ignore whitespace in element

Hi,

 I am trying to verify a signed SOAP request. But, somehow the digest created for Soap Body doesn't match the one present in the SOAP request for the SOAP Body. While signing the ignorable whitespace characters are taken into consideration. But, when the request is received at the server it doesn't contain the ignorable whitespace characters.

 For example when the content of a MessageElement containing text like
<TEXT> Value</TEXT> is accessed the leading space is not returned.
  
 It seems that Axis2 is automatically ignoring whitespace characters present in the Body of the SOAP Request.
  
 Is there anyway to access the full content of the element or to configure
AXIS2 so that such whitespace values are always returned in the element values?

Thanks & Regards,
Deepak.



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: How can I configure AXIS2 so that it does not ignore whitespace in element

Posted by Eran Chinthaka <er...@gmail.com>.
Hey Deepak,

For everyone's information, I wrote a description on this issue here (
http://wso2.org/library/tutorials/understanding-axiom-text-manipulation-apis).


Thanks,
Eran

On Wed, Aug 13, 2008 at 5:52 PM, Eran Chinthaka <er...@gmail.com>wrote:

> Hi,
>
> The element.getText() method trims all the whitespaces and I considered
> that as a convenient method when I was implementing that.
>
> If you want to get full information, call element.getChildren() and then
> the returned list should contain an OMText which has all the information u
> need.
>
> On Tue, Aug 12, 2008 at 9:01 AM, Deepak Vishwakarma <vdeepak79@yahoo.co.in
> > wrote:
>
>> I have no idea how to do that. If you can put some light on how to achieve
>> it at the AXIOM level, that would be perfectly fine.
>>
>> Thanks,
>> Deepak.
>>
>>
>> --- On Tue, 12/8/08, Samisa Abeysinghe <sa...@gmail.com>
>> wrote:
>>
>> > From: Samisa Abeysinghe <sa...@gmail.com>
>> > Subject: Re: How can I configure AXIS2 so that it does not ignore
>> whitespace in element
>> > To: axis-user@ws.apache.org
>> > Date: Tuesday, 12 August, 2008, 6:23 PM
>>  > Could this be done at the AXIOM level, using an option?
>> >
>> > Samisa...
>> >
>> > Deepak Vishwakarma wrote:
>> > > Hi,
>> > >
>> > >  I am trying to verify a signed SOAP request. But,
>> > somehow the digest created for Soap Body doesn't match
>> > the one present in the SOAP request for the SOAP Body. While
>> > signing the ignorable whitespace characters are taken into
>> > consideration. But, when the request is received at the
>> > server it doesn't contain the ignorable whitespace
>> > characters.
>> > >
>> > >  For example when the content of a MessageElement
>> > containing text like
>> > > <TEXT> Value</TEXT> is accessed the
>> > leading space is not returned.
>> > >
>> > >  It seems that Axis2 is automatically ignoring
>> > whitespace characters present in the Body of the SOAP
>> > Request.
>> > >
>> > >  Is there anyway to access the full content of the
>> > element or to configure
>> > > AXIS2 so that such whitespace values are always
>> > returned in the element values?
>> > >
>> > > Thanks & Regards,
>> > > Deepak.
>> > >
>> > >
>> > >
>> > >       Unlimited freedom, unlimited storage. Get it
>> > now, on
>> > http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
>> > >
>> > >
>> > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail:
>> > axis-user-unsubscribe@ws.apache.org
>> > > For additional commands, e-mail:
>> > axis-user-help@ws.apache.org
>> > >
>> > >
>> > >
>> >
>> >
>> > --
>> > Samisa Abeysinghe
>> >
>> > http://people.apache.org/~samisa/ <http://people.apache.org/%7Esamisa/>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail:
>> > axis-user-help@ws.apache.org
>>
>>
>>      Did you know? You can CHAT without downloading messenger. Go to
>> http://in.webmessenger.yahoo.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> --
> With Mettha,
> Eran Chinthaka
>
> --------------------------------------------------------------------
> Health is the greatest gift; contentment is the greatest wealth; trusting
> is the best relationship; nirvana is the highest joy. - Dhammapada
>



-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada

Re: How can I configure AXIS2 so that it does not ignore whitespace in element

Posted by Eran Chinthaka <er...@gmail.com>.
Hi,

The element.getText() method trims all the whitespaces and I considered that
as a convenient method when I was implementing that.

If you want to get full information, call element.getChildren() and then the
returned list should contain an OMText which has all the information u need.

On Tue, Aug 12, 2008 at 9:01 AM, Deepak Vishwakarma
<vd...@yahoo.co.in>wrote:

> I have no idea how to do that. If you can put some light on how to achieve
> it at the AXIOM level, that would be perfectly fine.
>
> Thanks,
> Deepak.
>
>
> --- On Tue, 12/8/08, Samisa Abeysinghe <sa...@gmail.com>
> wrote:
>
> > From: Samisa Abeysinghe <sa...@gmail.com>
> > Subject: Re: How can I configure AXIS2 so that it does not ignore
> whitespace in element
> > To: axis-user@ws.apache.org
> > Date: Tuesday, 12 August, 2008, 6:23 PM
>  > Could this be done at the AXIOM level, using an option?
> >
> > Samisa...
> >
> > Deepak Vishwakarma wrote:
> > > Hi,
> > >
> > >  I am trying to verify a signed SOAP request. But,
> > somehow the digest created for Soap Body doesn't match
> > the one present in the SOAP request for the SOAP Body. While
> > signing the ignorable whitespace characters are taken into
> > consideration. But, when the request is received at the
> > server it doesn't contain the ignorable whitespace
> > characters.
> > >
> > >  For example when the content of a MessageElement
> > containing text like
> > > <TEXT> Value</TEXT> is accessed the
> > leading space is not returned.
> > >
> > >  It seems that Axis2 is automatically ignoring
> > whitespace characters present in the Body of the SOAP
> > Request.
> > >
> > >  Is there anyway to access the full content of the
> > element or to configure
> > > AXIS2 so that such whitespace values are always
> > returned in the element values?
> > >
> > > Thanks & Regards,
> > > Deepak.
> > >
> > >
> > >
> > >       Unlimited freedom, unlimited storage. Get it
> > now, on
> > http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > >
> > >
> > >
> >
> >
> > --
> > Samisa Abeysinghe
> >
> > http://people.apache.org/~samisa/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
>
>
>      Did you know? You can CHAT without downloading messenger. Go to
> http://in.webmessenger.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada

Re: How can I configure AXIS2 so that it does not ignore whitespace in element

Posted by Deepak Vishwakarma <vd...@yahoo.co.in>.
I have no idea how to do that. If you can put some light on how to achieve it at the AXIOM level, that would be perfectly fine.

Thanks,
Deepak.


--- On Tue, 12/8/08, Samisa Abeysinghe <sa...@gmail.com> wrote:

> From: Samisa Abeysinghe <sa...@gmail.com>
> Subject: Re: How can I configure AXIS2 so that it does not ignore whitespace in element
> To: axis-user@ws.apache.org
> Date: Tuesday, 12 August, 2008, 6:23 PM
> Could this be done at the AXIOM level, using an option?
> 
> Samisa...
> 
> Deepak Vishwakarma wrote:
> > Hi,
> >
> >  I am trying to verify a signed SOAP request. But,
> somehow the digest created for Soap Body doesn't match
> the one present in the SOAP request for the SOAP Body. While
> signing the ignorable whitespace characters are taken into
> consideration. But, when the request is received at the
> server it doesn't contain the ignorable whitespace
> characters.
> >
> >  For example when the content of a MessageElement
> containing text like
> > <TEXT> Value</TEXT> is accessed the
> leading space is not returned.
> >   
> >  It seems that Axis2 is automatically ignoring
> whitespace characters present in the Body of the SOAP
> Request.
> >   
> >  Is there anyway to access the full content of the
> element or to configure
> > AXIS2 so that such whitespace values are always
> returned in the element values?
> >
> > Thanks & Regards,
> > Deepak.
> >
> >
> >
> >       Unlimited freedom, unlimited storage. Get it
> now, on
> http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> axis-user-help@ws.apache.org
> >
> >
> >   
> 
> 
> -- 
> Samisa Abeysinghe
> 
> http://people.apache.org/~samisa/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org


      Did you know? You can CHAT without downloading messenger. Go to http://in.webmessenger.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: How can I configure AXIS2 so that it does not ignore whitespace in element

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Could this be done at the AXIOM level, using an option?

Samisa...

Deepak Vishwakarma wrote:
> Hi,
>
>  I am trying to verify a signed SOAP request. But, somehow the digest created for Soap Body doesn't match the one present in the SOAP request for the SOAP Body. While signing the ignorable whitespace characters are taken into consideration. But, when the request is received at the server it doesn't contain the ignorable whitespace characters.
>
>  For example when the content of a MessageElement containing text like
> <TEXT> Value</TEXT> is accessed the leading space is not returned.
>   
>  It seems that Axis2 is automatically ignoring whitespace characters present in the Body of the SOAP Request.
>   
>  Is there anyway to access the full content of the element or to configure
> AXIS2 so that such whitespace values are always returned in the element values?
>
> Thanks & Regards,
> Deepak.
>
>
>
>       Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   


-- 
Samisa Abeysinghe

http://people.apache.org/~samisa/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org