You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Bo...@putnam.com on 2002/06/26 20:24:19 UTC
byte array over SOAP
Hi,
I have a client that is trying to make a SOAP call having a byte array as a
parameter, but I receive no serializers/deserializers error.
I thought that one can use Java arrays as parameters.
Then I tried to convert the byte array to string, for the purpose of using
SOAP but I get the following exception:
Fault Code = SOAP-ENV:Client
Fault String = parsing error: org.xml.sax.SAXParseException: An invalid XML
character (Unicode: 0x2) was found in the element content of the document.
Any idea how I can fix this problem or change my call.
Thanks Boris
Boris Paskalev
Phone: 617-760-1570
Cell: 617-953-0712
Re: byte array over SOAP
Posted by WJCarpenter <bi...@carpenter.ORG>.
> I have a client that is trying to make a SOAP call having a byte array
> as a parameter, but I receive no serializers/deserializers error.
I don't know why you get this error. Apache SOAP serializes byte arrays
just fine. (In fact, we use byte arrays to carry strings in some of our
tricky circumstances.)
> Then I tried to convert the byte array to string, for the purpose of
> using SOAP but I get the following exception:
>
> Fault Code = SOAP-ENV:Client
> Fault String = parsing error: org.xml.sax.SAXParseException: An invalid
> XML character (Unicode: 0x2) was found in the element content of the
> document.
That error is legit. If you wander around the XML specs and stare at
Unicode tables long enough, you'll eventually conclude that you can't have
most control characters in Unicode (you have a Control-B), and therefore
you can't have them in your XML. The good news is that when you figure
out how to send the byte array as a parameter, Apache SOAP will
automatically base64 encode it for you for transport.
--
bill@carpenter.ORG (WJCarpenter) PGP 0x91865119
38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
Re: byte array over SOAP
Posted by WJCarpenter <bi...@carpenter.ORG>.
> I have a client that is trying to make a SOAP call having a byte array
> as a parameter, but I receive no serializers/deserializers error.
I don't know why you get this error. Apache SOAP serializes byte arrays
just fine. (In fact, we use byte arrays to carry strings in some of our
tricky circumstances.)
> Then I tried to convert the byte array to string, for the purpose of
> using SOAP but I get the following exception:
>
> Fault Code = SOAP-ENV:Client
> Fault String = parsing error: org.xml.sax.SAXParseException: An invalid
> XML character (Unicode: 0x2) was found in the element content of the
> document.
That error is legit. If you wander around the XML specs and stare at
Unicode tables long enough, you'll eventually conclude that you can't have
most control characters in Unicode (you have a Control-B), and therefore
you can't have them in your XML. The good news is that when you figure
out how to send the byte array as a parameter, Apache SOAP will
automatically base64 encode it for you for transport.
--
bill@carpenter.ORG (WJCarpenter) PGP 0x91865119
38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
--
To unsubscribe, e-mail: <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>