You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Satish Kumar <sa...@rediffmail.com> on 2006/07/06 07:41:43 UTC

Base64 Decoding

Hi,

Need some clarifactions ! XSD contains an element whcih is of type "base64Binary". After unmarshlling the XML, i use the method "getByteArrayValue()" to fecth the value. XML beans automatically invokes its Base64 and decodes my object value, and returns me the decoded value. I dont want this to happen, i would like to get the encoded value as it is.

I even tried using the method getStringValue(), this returns me the encoded value only, but internally XMLBeans decodes it to check whether the value is a valid Base64. I dont want this to happen, how can it be done.

I need this in a case where an external application fisrt encodes a value and then sends it in small chunks by multiple xml's to our application. Our application will receive all the XML then concatenate the received bytes of this element and then only decode it.


Thanks !!!

Rgds,
Satish

Re: Base64 Decoding

Posted by Erik van Zijst <xm...@erik.prutser.cx>.
Satish Kumar wrote:
> Hi,
> 
> Need some clarifactions ! XSD contains an element whcih is of type 
> "base64Binary". After unmarshlling the XML, i use the method 
> "getByteArrayValue()" to fecth the value. XML beans automatically 
> invokes its Base64 and decodes my object value, and returns me the 
> decoded value. I dont want this to happen, i would like to get the 
> encoded value as it is.
> 
> I even tried using the method getStringValue(), this returns me the 
> encoded value only, but internally XMLBeans decodes it to check whether 
> the value is a valid Base64. I dont want this to happen, how can it be done.

Why is it a problem if xmlbeans takes a peek at the decoded chunk? It 
still gives you the encoded data.

I would guess you could still access the raw content using getNode() and 
working with the DOM from there.


> I need this in a case where an external application fisrt encodes a 
> value and then sends it in small chunks by multiple xml's to our 
> application. Our application will receive all the XML then concatenate 
> the received bytes of this element and then only decode it.
> 
> 
> Thanks !!!
> 
> Rgds,
> Satish
> 
> 
> 
> <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3> 
> 

-- 
Duty, n:
	What one expects from others.
		-- Oscar Wilde

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


RE: Base64 Decoding

Posted by Cezar Andrei <ce...@bea.com>.
Did you try using XmlCursor?

Cezar

> -----Original Message-----
> From: Satish Kumar [mailto:satish_subramaniam@rediffmail.com]
> Sent: Thursday, July 06, 2006 12:42 AM
> To: user@xmlbeans.apache.org
> Subject: Base64 Decoding
> 
> Hi,
> 
> Need some clarifactions ! XSD contains an element whcih is of type
> "base64Binary". After unmarshlling the XML, i use the method
> "getByteArrayValue()" to fecth the value. XML beans automatically
invokes
> its Base64 and decodes my object value, and returns me the decoded
value.
> I dont want this to happen, i would like to get the encoded value as
it
> is.
> 
> I even tried using the method getStringValue(), this returns me the
> encoded value only, but internally XMLBeans decodes it to check
whether
> the value is a valid Base64. I dont want this to happen, how can it be
> done.
> 
> I need this in a case where an external application fisrt encodes a
value
> and then sends it in small chunks by multiple xml's to our
application.
> Our application will receive all the XML then concatenate the received
> bytes of this element and then only decode it.
> 
> 
> Thanks !!!
> 
> Rgds,
> Satish
> 
> 
> 
> 
>  <http://adworks.rediff.com/cgi-
> bin/AdWorks/sigclick.cgi/www.rediff.com/signature-
> home.htm/1507191490@Middle5?PARTNER=3>
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

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