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 Ji...@Prometric.com on 2000/10/24 18:04:02 UTC

Base64Serializer

Can anyone help me out with the Base64Serializer? I have two questions.

1. GETTING STARTED...

As I understand things, Base64Serializer can be used to serialize a byte[]
(byte array), but how do you register the serializer to handle byte[]? I
guessed at the following, but I guessed wrong!

    <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
             xmlns:x="urn:com_my_utility" qname="x:byte[]"
             javaType="byte[]"
             java2XMLClassName
="org.apache.soap.encoding.soapenc.Base64Serializer"
             xml2JavaClassName
="org.apache.soap.encoding.soapenc.Base64Serializer"/>
  </isd:mappings>


2. SENDING FILES IN BLOCKS...

Is there any support for sending files in blocks using Base64Serializer (or
using anything else, for that matter). And of course, checkpoint restart
would be very helpful!!



Re: Base64Serializer

Posted by Stephan Nagy <sn...@connectria.com>.
Rich Johns wrote:

> Can someone from the development team please comment
> on why the contents of a String passed as a parameter are being
> examined? Is this a simple thing to fix or is there some good reason
> for it? Why can't the String type simply pass through?

I'm not on the dev team but in my case the value of the string is an attribute of an xml element
and an xml element that looks like <element attribute="<some more xml/>"/> isn't  a legal xml
document as the parser will probably barf on it.

Just a guess though.
-stephan


Re: Base64Serializer

Posted by Stephan Nagy <sn...@connectria.com>.
Rich Johns wrote:

> Can someone from the development team please comment
> on why the contents of a String passed as a parameter are being
> examined? Is this a simple thing to fix or is there some good reason
> for it? Why can't the String type simply pass through?

I'm not on the dev team but in my case the value of the string is an attribute of an xml element
and an xml element that looks like <element attribute="<some more xml/>"/> isn't  a legal xml
document as the parser will probably barf on it.

Just a guess though.
-stephan


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
Can someone from the development team please comment
on why the contents of a String passed as a parameter are being
examined? Is this a simple thing to fix or is there some good reason
for it? Why can't the String type simply pass through?

Thanks.

chuck clark wrote:

> i think if you pass it in as a byte[] instead of soing the base64 conversion yourself
> you'll see this problem go away
> the Base64 decoding algorithm expects it's input to be of a certain length...so the
> encoding will tack on additional 0x0 at the end force the string to end on a decodable
> boundary...these probably get removed automatically when the SOAP architecture does the
> base64 work instead of you
>
> i'm glad someone else is having trouble sending XML strings as well...i thought it was just
> me...it seems that it should wrap a string in a CDATA tag, the characters should get
> escaped out or there needs to be a new type called XMLString or something
>
> chuck
>
> Stephan Nagy wrote:
>
> > Rich Johns wrote:
> >
> > > chuck clark wrote:
> > >
> > > > essentially yes....i haven't tried a string that simple yet...but i was trying to
> > >
> > > has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> > > I can't test this right now, I'm totally out of the water at the moment.
> > >
> >
> > Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
> > to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
> > several 0x0 characters to the end of the string on the decode and resulted in an
> > unparsable document being the lazy person I am I just used a different base63 encoder.
> >
> > -stephan


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
Can someone from the development team please comment
on why the contents of a String passed as a parameter are being
examined? Is this a simple thing to fix or is there some good reason
for it? Why can't the String type simply pass through?

Thanks.

chuck clark wrote:

> i think if you pass it in as a byte[] instead of soing the base64 conversion yourself
> you'll see this problem go away
> the Base64 decoding algorithm expects it's input to be of a certain length...so the
> encoding will tack on additional 0x0 at the end force the string to end on a decodable
> boundary...these probably get removed automatically when the SOAP architecture does the
> base64 work instead of you
>
> i'm glad someone else is having trouble sending XML strings as well...i thought it was just
> me...it seems that it should wrap a string in a CDATA tag, the characters should get
> escaped out or there needs to be a new type called XMLString or something
>
> chuck
>
> Stephan Nagy wrote:
>
> > Rich Johns wrote:
> >
> > > chuck clark wrote:
> > >
> > > > essentially yes....i haven't tried a string that simple yet...but i was trying to
> > >
> > > has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> > > I can't test this right now, I'm totally out of the water at the moment.
> > >
> >
> > Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
> > to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
> > several 0x0 characters to the end of the string on the decode and resulted in an
> > unparsable document being the lazy person I am I just used a different base63 encoder.
> >
> > -stephan


Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
i think if you pass it in as a byte[] instead of soing the base64 conversion yourself
you'll see this problem go away
the Base64 decoding algorithm expects it's input to be of a certain length...so the
encoding will tack on additional 0x0 at the end force the string to end on a decodable
boundary...these probably get removed automatically when the SOAP architecture does the
base64 work instead of you

i'm glad someone else is having trouble sending XML strings as well...i thought it was just
me...it seems that it should wrap a string in a CDATA tag, the characters should get
escaped out or there needs to be a new type called XMLString or something

chuck

Stephan Nagy wrote:

> Rich Johns wrote:
>
> > chuck clark wrote:
> >
> > > essentially yes....i haven't tried a string that simple yet...but i was trying to
> >
> > has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> > I can't test this right now, I'm totally out of the water at the moment.
> >
>
> Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
> to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
> several 0x0 characters to the end of the string on the decode and resulted in an
> unparsable document being the lazy person I am I just used a different base63 encoder.
>
> -stephan


Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
i think if you pass it in as a byte[] instead of soing the base64 conversion yourself
you'll see this problem go away
the Base64 decoding algorithm expects it's input to be of a certain length...so the
encoding will tack on additional 0x0 at the end force the string to end on a decodable
boundary...these probably get removed automatically when the SOAP architecture does the
base64 work instead of you

i'm glad someone else is having trouble sending XML strings as well...i thought it was just
me...it seems that it should wrap a string in a CDATA tag, the characters should get
escaped out or there needs to be a new type called XMLString or something

chuck

Stephan Nagy wrote:

> Rich Johns wrote:
>
> > chuck clark wrote:
> >
> > > essentially yes....i haven't tried a string that simple yet...but i was trying to
> >
> > has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> > I can't test this right now, I'm totally out of the water at the moment.
> >
>
> Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
> to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
> several 0x0 characters to the end of the string on the decode and resulted in an
> unparsable document being the lazy person I am I just used a different base63 encoder.
>
> -stephan


Re: Base64Serializer

Posted by Stephan Nagy <sn...@connectria.com>.
Rich Johns wrote:

> chuck clark wrote:
>
> > essentially yes....i haven't tried a string that simple yet...but i was trying to
>
> has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> I can't test this right now, I'm totally out of the water at the moment.
>

Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
several 0x0 characters to the end of the string on the decode and resulted in an
unparsable document being the lazy person I am I just used a different base63 encoder.

-stephan


Re: Base64Serializer

Posted by Stephan Nagy <sn...@connectria.com>.
Rich Johns wrote:

> chuck clark wrote:
>
> > essentially yes....i haven't tried a string that simple yet...but i was trying to
>
> has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
> I can't test this right now, I'm totally out of the water at the moment.
>

Yes, not that exact string but one very similar.  I had to use Base64 encoding to get it
to work, i did note that calling org.apache.xerces.util.Base64.encode directly added
several 0x0 characters to the end of the string on the decode and resulted in an
unparsable document being the lazy person I am I just used a different base63 encoder.

-stephan


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
chuck clark wrote:

> essentially yes....i haven't tried a string that simple yet...but i was trying to

has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
I can't test this right now, I'm totally out of the water at the moment.

>
> send a rather large XML document which made a reference to an external DTD and
> optionally had CDATA tags within it...i was reading it from a file so i didn't want
> the overhead of having the DOM parse it to effectively serialize it back to XML right
> away and send it across the wire....switching the method signature to take a byte[]
> and calling getBytes was much easier and allowed me to get on to working on other
> issues for our deadline..

I was under the impression that using Base64 encoding is a bit inefficient because it
bloats the data. I too was hoping to avoid excessive DOM parsing and unparsing and
simply ship xml over the wire as strings. In my case I was thinking of
snippets of xml as opposed to entire files with DTD references, etc., although the
size and the content of the String shouldn't matter.

>
>
> found another resource which people might find useful: www.xmethods.com
> basically a directory of SOAP services which are freely available at xmethods...gives
> you something to test against
>
> cheers
> chuck
>
> Rich Johns wrote:
>
> > Wait, are you (or anyone) saying that you cannot send this:
> >
> > "<Foo> <name> Fred</name></Foo>"
> >
> > as a String parameter without surrounding it with a CDATA?
> >
> > thanks.
> >
> > Benjamin Rich wrote:
> >
> > > Hi,
> > >
> > > Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> > > anything yet, actually I'm pretty new to SOAP and am still trying to
> > > understand the basics, but what I was planning to do was to create a
> > > special serializer for XML data that would just surround it with
> > > <![CDATA[...]]>
> > >
> > > tags.  Will this work?  Happy to hear comments.
> > >
> > > Ben
> > >
> > > chuck clark wrote:
> > > >
> > > > jim...
> > > > are you using the Call object to generate your SOAP requests?  or are you
> > > > generating the XML by hand?  i haven't actually written any serializers for my
> > > > own objects yet but when i create a new Parameter and set the type to
> > > > byte[].class it is all handled automatically
> > > >
> > > > i'm not sure if this even helps at all other than to say i know it works
> > > > because i'm using it...basically i'm reading a file in and passing it up
> > > > Base64Encoded
> > > >
> > > > i started using it because i had a String which contained XML and it was
> > > > causing SOAP to choke...has anyone else managed to send Strings which contain
> > > > XML?
> > > >
> > > > cheers
> > > > chuck
> > > >
> > > > Jim.Sweeney@Prometric.com wrote:
> > > >
> > > > > Can anyone help me out with the Base64Serializer? I have two questions.
> > > > >
> > > > > 1. GETTING STARTED...
> > > > >
> > > > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > > > (byte array), but how do you register the serializer to handle byte[]? I
> > > > > guessed at the following, but I guessed wrong!
> > > > >
> > > > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > > > >              javaType="byte[]"
> > > > >              java2XMLClassName
> > > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > > > >              xml2JavaClassName
> > > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > > > >   </isd:mappings>
> > > > >
> > > > > 2. SENDING FILES IN BLOCKS...
> > > > >
> > > > > Is there any support for sending files in blocks using Base64Serializer (or
> > > > > using anything else, for that matter). And of course, checkpoint restart
> > > > > would be very helpful!!
> > >
> > > --
> > >
> > > Benjamin Rich
> > > CTB CAMTEC Software GmbH Berlin / Germany
> > > D-12435 Berlin, An den Treptowers 1
> > > Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> > > http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
chuck clark wrote:

> essentially yes....i haven't tried a string that simple yet...but i was trying to

has anyone tried a simple String like this: "<Foo> <name> Fred</name></Foo>" ?
I can't test this right now, I'm totally out of the water at the moment.

>
> send a rather large XML document which made a reference to an external DTD and
> optionally had CDATA tags within it...i was reading it from a file so i didn't want
> the overhead of having the DOM parse it to effectively serialize it back to XML right
> away and send it across the wire....switching the method signature to take a byte[]
> and calling getBytes was much easier and allowed me to get on to working on other
> issues for our deadline..

I was under the impression that using Base64 encoding is a bit inefficient because it
bloats the data. I too was hoping to avoid excessive DOM parsing and unparsing and
simply ship xml over the wire as strings. In my case I was thinking of
snippets of xml as opposed to entire files with DTD references, etc., although the
size and the content of the String shouldn't matter.

>
>
> found another resource which people might find useful: www.xmethods.com
> basically a directory of SOAP services which are freely available at xmethods...gives
> you something to test against
>
> cheers
> chuck
>
> Rich Johns wrote:
>
> > Wait, are you (or anyone) saying that you cannot send this:
> >
> > "<Foo> <name> Fred</name></Foo>"
> >
> > as a String parameter without surrounding it with a CDATA?
> >
> > thanks.
> >
> > Benjamin Rich wrote:
> >
> > > Hi,
> > >
> > > Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> > > anything yet, actually I'm pretty new to SOAP and am still trying to
> > > understand the basics, but what I was planning to do was to create a
> > > special serializer for XML data that would just surround it with
> > > <![CDATA[...]]>
> > >
> > > tags.  Will this work?  Happy to hear comments.
> > >
> > > Ben
> > >
> > > chuck clark wrote:
> > > >
> > > > jim...
> > > > are you using the Call object to generate your SOAP requests?  or are you
> > > > generating the XML by hand?  i haven't actually written any serializers for my
> > > > own objects yet but when i create a new Parameter and set the type to
> > > > byte[].class it is all handled automatically
> > > >
> > > > i'm not sure if this even helps at all other than to say i know it works
> > > > because i'm using it...basically i'm reading a file in and passing it up
> > > > Base64Encoded
> > > >
> > > > i started using it because i had a String which contained XML and it was
> > > > causing SOAP to choke...has anyone else managed to send Strings which contain
> > > > XML?
> > > >
> > > > cheers
> > > > chuck
> > > >
> > > > Jim.Sweeney@Prometric.com wrote:
> > > >
> > > > > Can anyone help me out with the Base64Serializer? I have two questions.
> > > > >
> > > > > 1. GETTING STARTED...
> > > > >
> > > > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > > > (byte array), but how do you register the serializer to handle byte[]? I
> > > > > guessed at the following, but I guessed wrong!
> > > > >
> > > > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > > > >              javaType="byte[]"
> > > > >              java2XMLClassName
> > > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > > > >              xml2JavaClassName
> > > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > > > >   </isd:mappings>
> > > > >
> > > > > 2. SENDING FILES IN BLOCKS...
> > > > >
> > > > > Is there any support for sending files in blocks using Base64Serializer (or
> > > > > using anything else, for that matter). And of course, checkpoint restart
> > > > > would be very helpful!!
> > >
> > > --
> > >
> > > Benjamin Rich
> > > CTB CAMTEC Software GmbH Berlin / Germany
> > > D-12435 Berlin, An den Treptowers 1
> > > Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> > > http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
essentially yes....i haven't tried a string that simple yet...but i was trying to
send a rather large XML document which made a reference to an external DTD and
optionally had CDATA tags within it...i was reading it from a file so i didn't want
the overhead of having the DOM parse it to effectively serialize it back to XML right
away and send it across the wire....switching the method signature to take a byte[]
and calling getBytes was much easier and allowed me to get on to working on other
issues for our deadline...which jim i haven't forgotten about you...i'll hopefully be
able to run the code today or tomorrow

found another resource which people might find useful: www.xmethods.com
basically a directory of SOAP services which are freely available at xmethods...gives
you something to test against

cheers
chuck

Rich Johns wrote:

> Wait, are you (or anyone) saying that you cannot send this:
>
> "<Foo> <name> Fred</name></Foo>"
>
> as a String parameter without surrounding it with a CDATA?
>
> thanks.
>
> Benjamin Rich wrote:
>
> > Hi,
> >
> > Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> > anything yet, actually I'm pretty new to SOAP and am still trying to
> > understand the basics, but what I was planning to do was to create a
> > special serializer for XML data that would just surround it with
> > <![CDATA[...]]>
> >
> > tags.  Will this work?  Happy to hear comments.
> >
> > Ben
> >
> > chuck clark wrote:
> > >
> > > jim...
> > > are you using the Call object to generate your SOAP requests?  or are you
> > > generating the XML by hand?  i haven't actually written any serializers for my
> > > own objects yet but when i create a new Parameter and set the type to
> > > byte[].class it is all handled automatically
> > >
> > > i'm not sure if this even helps at all other than to say i know it works
> > > because i'm using it...basically i'm reading a file in and passing it up
> > > Base64Encoded
> > >
> > > i started using it because i had a String which contained XML and it was
> > > causing SOAP to choke...has anyone else managed to send Strings which contain
> > > XML?
> > >
> > > cheers
> > > chuck
> > >
> > > Jim.Sweeney@Prometric.com wrote:
> > >
> > > > Can anyone help me out with the Base64Serializer? I have two questions.
> > > >
> > > > 1. GETTING STARTED...
> > > >
> > > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > > (byte array), but how do you register the serializer to handle byte[]? I
> > > > guessed at the following, but I guessed wrong!
> > > >
> > > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > > >              javaType="byte[]"
> > > >              java2XMLClassName
> > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > > >              xml2JavaClassName
> > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > > >   </isd:mappings>
> > > >
> > > > 2. SENDING FILES IN BLOCKS...
> > > >
> > > > Is there any support for sending files in blocks using Base64Serializer (or
> > > > using anything else, for that matter). And of course, checkpoint restart
> > > > would be very helpful!!
> >
> > --
> >
> > Benjamin Rich
> > CTB CAMTEC Software GmbH Berlin / Germany
> > D-12435 Berlin, An den Treptowers 1
> > Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> > http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
essentially yes....i haven't tried a string that simple yet...but i was trying to
send a rather large XML document which made a reference to an external DTD and
optionally had CDATA tags within it...i was reading it from a file so i didn't want
the overhead of having the DOM parse it to effectively serialize it back to XML right
away and send it across the wire....switching the method signature to take a byte[]
and calling getBytes was much easier and allowed me to get on to working on other
issues for our deadline...which jim i haven't forgotten about you...i'll hopefully be
able to run the code today or tomorrow

found another resource which people might find useful: www.xmethods.com
basically a directory of SOAP services which are freely available at xmethods...gives
you something to test against

cheers
chuck

Rich Johns wrote:

> Wait, are you (or anyone) saying that you cannot send this:
>
> "<Foo> <name> Fred</name></Foo>"
>
> as a String parameter without surrounding it with a CDATA?
>
> thanks.
>
> Benjamin Rich wrote:
>
> > Hi,
> >
> > Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> > anything yet, actually I'm pretty new to SOAP and am still trying to
> > understand the basics, but what I was planning to do was to create a
> > special serializer for XML data that would just surround it with
> > <![CDATA[...]]>
> >
> > tags.  Will this work?  Happy to hear comments.
> >
> > Ben
> >
> > chuck clark wrote:
> > >
> > > jim...
> > > are you using the Call object to generate your SOAP requests?  or are you
> > > generating the XML by hand?  i haven't actually written any serializers for my
> > > own objects yet but when i create a new Parameter and set the type to
> > > byte[].class it is all handled automatically
> > >
> > > i'm not sure if this even helps at all other than to say i know it works
> > > because i'm using it...basically i'm reading a file in and passing it up
> > > Base64Encoded
> > >
> > > i started using it because i had a String which contained XML and it was
> > > causing SOAP to choke...has anyone else managed to send Strings which contain
> > > XML?
> > >
> > > cheers
> > > chuck
> > >
> > > Jim.Sweeney@Prometric.com wrote:
> > >
> > > > Can anyone help me out with the Base64Serializer? I have two questions.
> > > >
> > > > 1. GETTING STARTED...
> > > >
> > > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > > (byte array), but how do you register the serializer to handle byte[]? I
> > > > guessed at the following, but I guessed wrong!
> > > >
> > > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > > >              javaType="byte[]"
> > > >              java2XMLClassName
> > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > > >              xml2JavaClassName
> > > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > > >   </isd:mappings>
> > > >
> > > > 2. SENDING FILES IN BLOCKS...
> > > >
> > > > Is there any support for sending files in blocks using Base64Serializer (or
> > > > using anything else, for that matter). And of course, checkpoint restart
> > > > would be very helpful!!
> >
> > --
> >
> > Benjamin Rich
> > CTB CAMTEC Software GmbH Berlin / Germany
> > D-12435 Berlin, An den Treptowers 1
> > Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> > http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
Wait, are you (or anyone) saying that you cannot send this:

"<Foo> <name> Fred</name></Foo>"

as a String parameter without surrounding it with a CDATA?

thanks.


Benjamin Rich wrote:

> Hi,
>
> Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> anything yet, actually I'm pretty new to SOAP and am still trying to
> understand the basics, but what I was planning to do was to create a
> special serializer for XML data that would just surround it with
> <![CDATA[...]]>
>
> tags.  Will this work?  Happy to hear comments.
>
> Ben
>
> chuck clark wrote:
> >
> > jim...
> > are you using the Call object to generate your SOAP requests?  or are you
> > generating the XML by hand?  i haven't actually written any serializers for my
> > own objects yet but when i create a new Parameter and set the type to
> > byte[].class it is all handled automatically
> >
> > i'm not sure if this even helps at all other than to say i know it works
> > because i'm using it...basically i'm reading a file in and passing it up
> > Base64Encoded
> >
> > i started using it because i had a String which contained XML and it was
> > causing SOAP to choke...has anyone else managed to send Strings which contain
> > XML?
> >
> > cheers
> > chuck
> >
> > Jim.Sweeney@Prometric.com wrote:
> >
> > > Can anyone help me out with the Base64Serializer? I have two questions.
> > >
> > > 1. GETTING STARTED...
> > >
> > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > (byte array), but how do you register the serializer to handle byte[]? I
> > > guessed at the following, but I guessed wrong!
> > >
> > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > >              javaType="byte[]"
> > >              java2XMLClassName
> > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > >              xml2JavaClassName
> > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > >   </isd:mappings>
> > >
> > > 2. SENDING FILES IN BLOCKS...
> > >
> > > Is there any support for sending files in blocks using Base64Serializer (or
> > > using anything else, for that matter). And of course, checkpoint restart
> > > would be very helpful!!
>
> --
>
> Benjamin Rich
> CTB CAMTEC Software GmbH Berlin / Germany
> D-12435 Berlin, An den Treptowers 1
> Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by Rich Johns <rj...@vignette.com>.
Wait, are you (or anyone) saying that you cannot send this:

"<Foo> <name> Fred</name></Foo>"

as a String parameter without surrounding it with a CDATA?

thanks.


Benjamin Rich wrote:

> Hi,
>
> Chuck, I'm curious about sending XML in parameters too.  I haven't tried
> anything yet, actually I'm pretty new to SOAP and am still trying to
> understand the basics, but what I was planning to do was to create a
> special serializer for XML data that would just surround it with
> <![CDATA[...]]>
>
> tags.  Will this work?  Happy to hear comments.
>
> Ben
>
> chuck clark wrote:
> >
> > jim...
> > are you using the Call object to generate your SOAP requests?  or are you
> > generating the XML by hand?  i haven't actually written any serializers for my
> > own objects yet but when i create a new Parameter and set the type to
> > byte[].class it is all handled automatically
> >
> > i'm not sure if this even helps at all other than to say i know it works
> > because i'm using it...basically i'm reading a file in and passing it up
> > Base64Encoded
> >
> > i started using it because i had a String which contained XML and it was
> > causing SOAP to choke...has anyone else managed to send Strings which contain
> > XML?
> >
> > cheers
> > chuck
> >
> > Jim.Sweeney@Prometric.com wrote:
> >
> > > Can anyone help me out with the Base64Serializer? I have two questions.
> > >
> > > 1. GETTING STARTED...
> > >
> > > As I understand things, Base64Serializer can be used to serialize a byte[]
> > > (byte array), but how do you register the serializer to handle byte[]? I
> > > guessed at the following, but I guessed wrong!
> > >
> > >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> > >              javaType="byte[]"
> > >              java2XMLClassName
> > > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> > >              xml2JavaClassName
> > > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> > >   </isd:mappings>
> > >
> > > 2. SENDING FILES IN BLOCKS...
> > >
> > > Is there any support for sending files in blocks using Base64Serializer (or
> > > using anything else, for that matter). And of course, checkpoint restart
> > > would be very helpful!!
>
> --
>
> Benjamin Rich
> CTB CAMTEC Software GmbH Berlin / Germany
> D-12435 Berlin, An den Treptowers 1
> Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
> http://www.camtec.com    mailto:benjamin.rich@camtec.com


Re: Base64Serializer

Posted by Benjamin Rich <be...@camtec.com>.
Hi,

Chuck, I'm curious about sending XML in parameters too.  I haven't tried
anything yet, actually I'm pretty new to SOAP and am still trying to
understand the basics, but what I was planning to do was to create a
special serializer for XML data that would just surround it with 
<![CDATA[...]]>

tags.  Will this work?  Happy to hear comments.

Ben

chuck clark wrote:
> 
> jim...
> are you using the Call object to generate your SOAP requests?  or are you
> generating the XML by hand?  i haven't actually written any serializers for my
> own objects yet but when i create a new Parameter and set the type to
> byte[].class it is all handled automatically
> 
> i'm not sure if this even helps at all other than to say i know it works
> because i'm using it...basically i'm reading a file in and passing it up
> Base64Encoded
> 
> i started using it because i had a String which contained XML and it was
> causing SOAP to choke...has anyone else managed to send Strings which contain
> XML?
> 
> cheers
> chuck
> 
> Jim.Sweeney@Prometric.com wrote:
> 
> > Can anyone help me out with the Base64Serializer? I have two questions.
> >
> > 1. GETTING STARTED...
> >
> > As I understand things, Base64Serializer can be used to serialize a byte[]
> > (byte array), but how do you register the serializer to handle byte[]? I
> > guessed at the following, but I guessed wrong!
> >
> >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> >              javaType="byte[]"
> >              java2XMLClassName
> > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> >              xml2JavaClassName
> > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> >   </isd:mappings>
> >
> > 2. SENDING FILES IN BLOCKS...
> >
> > Is there any support for sending files in blocks using Base64Serializer (or
> > using anything else, for that matter). And of course, checkpoint restart
> > would be very helpful!!

-- 

Benjamin Rich
CTB CAMTEC Software GmbH Berlin / Germany
D-12435 Berlin, An den Treptowers 1
Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
http://www.camtec.com    mailto:benjamin.rich@camtec.com

Re: Base64Serializer

Posted by Benjamin Rich <be...@camtec.com>.
Hi,

Chuck, I'm curious about sending XML in parameters too.  I haven't tried
anything yet, actually I'm pretty new to SOAP and am still trying to
understand the basics, but what I was planning to do was to create a
special serializer for XML data that would just surround it with 
<![CDATA[...]]>

tags.  Will this work?  Happy to hear comments.

Ben

chuck clark wrote:
> 
> jim...
> are you using the Call object to generate your SOAP requests?  or are you
> generating the XML by hand?  i haven't actually written any serializers for my
> own objects yet but when i create a new Parameter and set the type to
> byte[].class it is all handled automatically
> 
> i'm not sure if this even helps at all other than to say i know it works
> because i'm using it...basically i'm reading a file in and passing it up
> Base64Encoded
> 
> i started using it because i had a String which contained XML and it was
> causing SOAP to choke...has anyone else managed to send Strings which contain
> XML?
> 
> cheers
> chuck
> 
> Jim.Sweeney@Prometric.com wrote:
> 
> > Can anyone help me out with the Base64Serializer? I have two questions.
> >
> > 1. GETTING STARTED...
> >
> > As I understand things, Base64Serializer can be used to serialize a byte[]
> > (byte array), but how do you register the serializer to handle byte[]? I
> > guessed at the following, but I guessed wrong!
> >
> >     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >              xmlns:x="urn:com_my_utility" qname="x:byte[]"
> >              javaType="byte[]"
> >              java2XMLClassName
> > ="org.apache.soap.encoding.soapenc.Base64Serializer"
> >              xml2JavaClassName
> > ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
> >   </isd:mappings>
> >
> > 2. SENDING FILES IN BLOCKS...
> >
> > Is there any support for sending files in blocks using Base64Serializer (or
> > using anything else, for that matter). And of course, checkpoint restart
> > would be very helpful!!

-- 

Benjamin Rich
CTB CAMTEC Software GmbH Berlin / Germany
D-12435 Berlin, An den Treptowers 1
Phone: (+49)30-936941-0  Fax: (+49)30-936941-24
http://www.camtec.com    mailto:benjamin.rich@camtec.com

Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
jim...
are you using the Call object to generate your SOAP requests?  or are you
generating the XML by hand?  i haven't actually written any serializers for my
own objects yet but when i create a new Parameter and set the type to
byte[].class it is all handled automatically

i'm not sure if this even helps at all other than to say i know it works
because i'm using it...basically i'm reading a file in and passing it up
Base64Encoded

i started using it because i had a String which contained XML and it was
causing SOAP to choke...has anyone else managed to send Strings which contain
XML?

cheers
chuck

Jim.Sweeney@Prometric.com wrote:

> Can anyone help me out with the Base64Serializer? I have two questions.
>
> 1. GETTING STARTED...
>
> As I understand things, Base64Serializer can be used to serialize a byte[]
> (byte array), but how do you register the serializer to handle byte[]? I
> guessed at the following, but I guessed wrong!
>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>              xmlns:x="urn:com_my_utility" qname="x:byte[]"
>              javaType="byte[]"
>              java2XMLClassName
> ="org.apache.soap.encoding.soapenc.Base64Serializer"
>              xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
>   </isd:mappings>
>
> 2. SENDING FILES IN BLOCKS...
>
> Is there any support for sending files in blocks using Base64Serializer (or
> using anything else, for that matter). And of course, checkpoint restart
> would be very helpful!!


Re: Base64Serializer

Posted by chuck clark <cc...@ziclix.com>.
jim...
are you using the Call object to generate your SOAP requests?  or are you
generating the XML by hand?  i haven't actually written any serializers for my
own objects yet but when i create a new Parameter and set the type to
byte[].class it is all handled automatically

i'm not sure if this even helps at all other than to say i know it works
because i'm using it...basically i'm reading a file in and passing it up
Base64Encoded

i started using it because i had a String which contained XML and it was
causing SOAP to choke...has anyone else managed to send Strings which contain
XML?

cheers
chuck

Jim.Sweeney@Prometric.com wrote:

> Can anyone help me out with the Base64Serializer? I have two questions.
>
> 1. GETTING STARTED...
>
> As I understand things, Base64Serializer can be used to serialize a byte[]
> (byte array), but how do you register the serializer to handle byte[]? I
> guessed at the following, but I guessed wrong!
>
>     <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>              xmlns:x="urn:com_my_utility" qname="x:byte[]"
>              javaType="byte[]"
>              java2XMLClassName
> ="org.apache.soap.encoding.soapenc.Base64Serializer"
>              xml2JavaClassName
> ="org.apache.soap.encoding.soapenc.Base64Serializer"/>
>   </isd:mappings>
>
> 2. SENDING FILES IN BLOCKS...
>
> Is there any support for sending files in blocks using Base64Serializer (or
> using anything else, for that matter). And of course, checkpoint restart
> would be very helpful!!