Re: compressing soap message before sending
It just so happens that I'm in axis 1.3 land doing some docs. This should work so I'll go ahead and write a quick test case and try to get back to you later today. In the meantime, of course, see what you can do on your end to fix the problem. Robert http://www.braziloutsource.com/ Em Quarta 08 Março 2006 06:49, o Plorks mail escreveu: > hi all > > i'm trying to return a byte [] in my web service - when i run the method on > it's own (without going through the ws) it runs fine but when i run it > using the ws service ijust get a null back > > String uncompressed = "some string to compress in here"; > > URL endpoint = new URL("http://localhost:8080/services/base64";); > > Service service = new Service(); > > Call call = (Call) service.createCall(); > > call.setTargetEndpointAddress(endpoint); > > call.setOperationName("compress"); > > byte [] a = null; > > a = (byte[]) call.invoke(new Object[] {uncompressed}); - this is where it > bombs out > > if i do this, it is fine call.invoke(new Object[] {uncompressed}); > > any help much appreciated > > >From: "Plorks mail" <[EMAIL PROTECTED]> > >Reply-To: axis-user@ws.apache.org > >To: axis-user@ws.apache.org > >Subject: Re: compressing soap message before sending > >Date: Tue, 07 Mar 2006 13:47:56 + > > > >cool > > > >thanks for your help > > > >>From: "robert lazarski" <[EMAIL PROTECTED]> > >>Reply-To: axis-user@ws.apache.org > >>To: axis-user@ws.apache.org > >>Subject: Re: compressing soap message before sending > >>Date: Tue, 7 Mar 2006 09:45:16 -0300 > >> > >>That should be all there is to it. I do exactly the same thing with byte > >>arrays often. In the generated code from wsdl2java you should see a > >> setter that accepts a byte[] and a getter that receives one. > >> > >>If you get stuck just go ahead and ask. > >> > >>HTH, > >>Robert > >>http://www.braziloutsource.com/ > >> > >>On 3/7/06, Plorks mail <[EMAIL PROTECTED]> wrote: > >> > hi, > >> > > >> > would i have to do anything else to get this to work? in my wsdl i > >> > >>have > >> > >> > something like this > >> > > >> > > >> > - > >> > - > >> > > >> > > >> > > >> > > >> > > >> > > >> > would this now become > >> > > >> > > >> > - > >> > - > >> > > >> > > >> > > >> > > >> > > >> > ? > >> > > >> > do i have to do anything else? > >> > > >> > thanks for your help > >> > > >> > >From: robert <[EMAIL PROTECTED]> > >> > >Reply-To: axis-user@ws.apache.org > >> > >To: axis-user@ws.apache.org > >> > >Subject: Re: compressing soap message before sending > >> > >Date: Fri, 3 Mar 2006 13:20:27 -0300 > >> > > > >> > >I would just do getBytes() on the String and compress the byte array: > >> > > > >> > >http://javaalmanac.com/egs/java.util.zip/CompArray.html > >> > > > >> > >From there, define xsd:base64Binary in your wsdl for the byte array > >> > >>you > >> > >> > >send > >> > >over wire: > >> > > > >> > >HTH, > >> > >Robert > >> > >http://www.braziloutsource.com/ > >> > > > >> > >Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu: > >> > > > hi, > >> > > > > >> > > > can anyone giveme or lead me to a good exampleofcompressing a soap > >> > > > >> > >message? > >> > > > >> > > > i'm writing a web service where i'll be sending large amounts of > >> > >>data > >> > >> > >and > >> > > > >> > > > want to compress it before i send it? > >> > > > > >> > > > the data will be a String, not a file is this possible? > >> > > > > >> > > > also is it possible to compress the String, send it and when a > >> > >>client > >> > >> > > > receives it, it's automatically uncompressed? or would it be > >> > >>better > >> > >> > to > >> > > >> > > > send the compressed String and let the client uncompress it > >> > > > > >> > > > many thanks for any help > >> > > > > >> > > > _ > >> > > > Are you using the latest version of MSN Messenger? Download MSN > >> > > > >> > >Messenger > >> > > > >> > > > 7.5 today! http://messenger.msn.co.uk > >> > > > >> > >-- > >> > > >> > _ > >> > Be the first to hear what's new at MSN - sign up to our free > >> > >>newsletters! > >> > >> > http://www.msn.co.uk/newsletters > > > >_ > >The new MSN Search Toolbar now includes Desktop search! > >http://toolbar.msn.co.uk/ > > _ > The new MSN Search Toolbar now includes Desktop search! > http://toolbar.msn.co.uk/ --
Re: compressing soap message before sending
hi all i'm trying to return a byte [] in my web service - when i run the method on it's own (without going through the ws) it runs fine but when i run it using the ws service ijust get a null back String uncompressed = "some string to compress in here"; URL endpoint = new URL("http://localhost:8080/services/base64";); Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(endpoint); call.setOperationName("compress"); byte [] a = null; a = (byte[]) call.invoke(new Object[] {uncompressed}); - this is where it bombs out if i do this, it is fine call.invoke(new Object[] {uncompressed}); any help much appreciated From: "Plorks mail" <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: compressing soap message before sending Date: Tue, 07 Mar 2006 13:47:56 + cool thanks for your help From: "robert lazarski" <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: compressing soap message before sending Date: Tue, 7 Mar 2006 09:45:16 -0300 That should be all there is to it. I do exactly the same thing with byte arrays often. In the generated code from wsdl2java you should see a setter that accepts a byte[] and a getter that receives one. If you get stuck just go ahead and ask. HTH, Robert http://www.braziloutsource.com/ On 3/7/06, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > hi, > > would i have to do anything else to get this to work? in my wsdl i have > something like this > > > - > - > > > > > > > would this now become > > > - > - > > > > > > ? > > do i have to do anything else? > > thanks for your help > > > > > >From: robert <[EMAIL PROTECTED]> > >Reply-To: axis-user@ws.apache.org > >To: axis-user@ws.apache.org > >Subject: Re: compressing soap message before sending > >Date: Fri, 3 Mar 2006 13:20:27 -0300 > > > >I would just do getBytes() on the String and compress the byte array: > > > >http://javaalmanac.com/egs/java.util.zip/CompArray.html > > > >From there, define xsd:base64Binary in your wsdl for the byte array you > >send > >over wire: > > > >HTH, > >Robert > >http://www.braziloutsource.com/ > > > >Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu: > > > hi, > > > > > > can anyone giveme or lead me to a good exampleofcompressing a soap > >message? > > > > > > i'm writing a web service where i'll be sending large amounts of data > >and > > > want to compress it before i send it? > > > > > > the data will be a String, not a file is this possible? > > > > > > also is it possible to compress the String, send it and when a client > > > receives it, it's automatically uncompressed? or would it be better > to > > > send the compressed String and let the client uncompress it > > > > > > many thanks for any help > > > > > > _ > > > Are you using the latest version of MSN Messenger? Download MSN > >Messenger > > > 7.5 today! http://messenger.msn.co.uk > > > >-- > > _ > Be the first to hear what's new at MSN - sign up to our free newsletters! > http://www.msn.co.uk/newsletters > > _ The new MSN Search Toolbar now includes Desktop search! http://toolbar.msn.co.uk/ _ The new MSN Search Toolbar now includes Desktop search! http://toolbar.msn.co.uk/
Re: compressing soap message before sending
cool thanks for your help From: "robert lazarski" <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: compressing soap message before sending Date: Tue, 7 Mar 2006 09:45:16 -0300 That should be all there is to it. I do exactly the same thing with byte arrays often. In the generated code from wsdl2java you should see a setter that accepts a byte[] and a getter that receives one. If you get stuck just go ahead and ask. HTH, Robert http://www.braziloutsource.com/ On 3/7/06, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > hi, > > would i have to do anything else to get this to work? in my wsdl i have > something like this > > > - > - > > > > > > > would this now become > > > - > - > > > > > > ? > > do i have to do anything else? > > thanks for your help > > > > > >From: robert <[EMAIL PROTECTED]> > >Reply-To: axis-user@ws.apache.org > >To: axis-user@ws.apache.org > >Subject: Re: compressing soap message before sending > >Date: Fri, 3 Mar 2006 13:20:27 -0300 > > > >I would just do getBytes() on the String and compress the byte array: > > > >http://javaalmanac.com/egs/java.util.zip/CompArray.html > > > >From there, define xsd:base64Binary in your wsdl for the byte array you > >send > >over wire: > > > >HTH, > >Robert > >http://www.braziloutsource.com/ > > > >Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu: > > > hi, > > > > > > can anyone giveme or lead me to a good exampleofcompressing a soap > >message? > > > > > > i'm writing a web service where i'll be sending large amounts of data > >and > > > want to compress it before i send it? > > > > > > the data will be a String, not a file is this possible? > > > > > > also is it possible to compress the String, send it and when a client > > > receives it, it's automatically uncompressed? or would it be better > to > > > send the compressed String and let the client uncompress it > > > > > > many thanks for any help > > > > > > _ > > > Are you using the latest version of MSN Messenger? Download MSN > >Messenger > > > 7.5 today! http://messenger.msn.co.uk > > > >-- > > _ > Be the first to hear what's new at MSN - sign up to our free newsletters! > http://www.msn.co.uk/newsletters > > _ The new MSN Search Toolbar now includes Desktop search! http://toolbar.msn.co.uk/
Re: compressing soap message before sending
That should be all there is to it. I do exactly the same thing with byte arrays often. In the generated code from wsdl2java you should see a setter that accepts a byte[] and a getter that receives one. If you get stuck just go ahead and ask. HTH, Robert http://www.braziloutsource.com/ On 3/7/06, Plorks mail <[EMAIL PROTECTED]> wrote: hi,would i have to do anything else to get this to work? in my wsdl i havesomething like this- - would this now become- - ?do i have to do anything else?thanks for your help>From: robert < [EMAIL PROTECTED]>>Reply-To: axis-user@ws.apache.org>To: axis-user@ws.apache.org>Subject: Re: compressing soap message before sending >Date: Fri, 3 Mar 2006 13:20:27 -0300>>I would just do getBytes() on the String and compress the byte array:>>http://javaalmanac.com/egs/java.util.zip/CompArray.html >>From there, define xsd:base64Binary in your wsdl for the byte array you>send>over wire:>>HTH,>Robert>http://www.braziloutsource.com/ >>Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu:> > hi,> >> > can anyone giveme or lead me to a good exampleofcompressing a soap>message?> >> > i'm writing a web service where i'll be sending large amounts of data >and> > want to compress it before i send it?> >> > the data will be a String, not a file is this possible?> >> > also is it possible to compress the String, send it and when a client > > receives it, it's automatically uncompressed? or would it be better to> > send the compressed String and let the client uncompress it> >> > many thanks for any help> > > > _> > Are you using the latest version of MSN Messenger? Download MSN>Messenger> > 7.5 today! http://messenger.msn.co.uk>>--_Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
Re: compressing soap message before sending
hi, would i have to do anything else to get this to work? in my wsdl i have something like this - - would this now become - - ? do i have to do anything else? thanks for your help From: robert <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: compressing soap message before sending Date: Fri, 3 Mar 2006 13:20:27 -0300 I would just do getBytes() on the String and compress the byte array: http://javaalmanac.com/egs/java.util.zip/CompArray.html From there, define xsd:base64Binary in your wsdl for the byte array you send over wire: HTH, Robert http://www.braziloutsource.com/ Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu: > hi, > > can anyone giveme or lead me to a good exampleofcompressing a soap message? > > i'm writing a web service where i'll be sending large amounts of data and > want to compress it before i send it? > > the data will be a String, not a file is this possible? > > also is it possible to compress the String, send it and when a client > receives it, it's automatically uncompressed? or would it be better to > send the compressed String and let the client uncompress it > > many thanks for any help > > _ > Are you using the latest version of MSN Messenger? Download MSN Messenger > 7.5 today! http://messenger.msn.co.uk -- _ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
Re: compressing soap message before sending
Hello, Could Http gzip compression fit your needs ? Using it with Axis is documented on the wiki : http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression Cyrille-- Cyrille Le Clerc[EMAIL PROTECTED][EMAIL PROTECTED] On 3/3/06, Plorks mail <[EMAIL PROTECTED]> wrote: hi,can anyone giveme or lead me to a good exampleofcompressing a soap message?i'm writing a web service where i'll be sending large amounts of data andwant to compress it before i send it? the data will be a String, not a file is this possible?also is it possible to compress the String, send it and when a clientreceives it, it's automatically uncompressed? or would it be better to sendthe compressed String and let the client uncompress it many thanks for any help_Are you using the latest version of MSN Messenger? Download MSN Messenger7.5 today! http://messenger.msn.co.uk
Re: compressing soap message before sending
I would just do getBytes() on the String and compress the byte array: http://javaalmanac.com/egs/java.util.zip/CompArray.html From there, define xsd:base64Binary in your wsdl for the byte array you send over wire: HTH, Robert http://www.braziloutsource.com/ Em Sexta 03 Março 2006 12:50, o Plorks mail escreveu: > hi, > > can anyone giveme or lead me to a good exampleofcompressing a soap message? > > i'm writing a web service where i'll be sending large amounts of data and > want to compress it before i send it? > > the data will be a String, not a file is this possible? > > also is it possible to compress the String, send it and when a client > receives it, it's automatically uncompressed? or would it be better to > send the compressed String and let the client uncompress it > > many thanks for any help > > _ > Are you using the latest version of MSN Messenger? Download MSN Messenger > 7.5 today! http://messenger.msn.co.uk --
Re: compressing soap message before sending
webserver and client should be able to do it. on the server side there may be settings to enable compression. this is not related to webservices or anything. but not sure about your http client on the other side. ali At 07:50 AM 3/3/2006, you wrote: hi, can anyone giveme or lead me to a good exampleofcompressing a soap message? i'm writing a web service where i'll be sending large amounts of data and want to compress it before i send it? the data will be a String, not a file is this possible? also is it possible to compress the String, send it and when a client receives it, it's automatically uncompressed? or would it be better to send the compressed String and let the client uncompress it many thanks for any help _ Are you using the latest version of MSN Messenger? Download MSN Messenger 7.5 today! http://messenger.msn.co.uk
compressing soap message before sending
hi, can anyone giveme or lead me to a good exampleofcompressing a soap message? i'm writing a web service where i'll be sending large amounts of data and want to compress it before i send it? the data will be a String, not a file is this possible? also is it possible to compress the String, send it and when a client receives it, it's automatically uncompressed? or would it be better to send the compressed String and let the client uncompress it many thanks for any help _ Are you using the latest version of MSN Messenger? Download MSN Messenger 7.5 today! http://messenger.msn.co.uk