RE: Base64
Thanks Anne, But I forgot to mention that I am using Axis for generating the wsdl. Hence it will not define the type as type="xsd:base64binaryā€¯ so weather I have to modify the generated WSDL? Thank You again Nirmish -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 8:36 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Base64 Yes. Define it as type="xsd:base64binary". Anne On 8/10/06, Nirmish Dholakia <[EMAIL PROTECTED]> wrote: > > > Hi All, > > I have a web services written in Java. and the client for this > webservice is in .Net environment. > > I am passing an image file in this webservice using Base64 encoding. > > Now the question is will the .Net client able to decode the same? > > Please provide your views/inputs. > > Thank You > Nirmish > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: > 8/7/2006 > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Base64
Yes. Define it as type="xsd:base64binary". Anne On 8/10/06, Nirmish Dholakia <[EMAIL PROTECTED]> wrote: Hi All, I have a web services written in Java. and the client for this webservice is in .Net environment. I am passing an image file in this webservice using Base64 encoding. Now the question is will the .Net client able to decode the same? Please provide your views/inputs. Thank You Nirmish -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Base64 and Compression
Jan- I found this article to be quite helpful on applying Base64 encoding to either the envelope or the individual element http://xml.sys-con.com/read/40089.htm Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Jan Krumsiek" <[EMAIL PROTECTED]> To: Sent: Monday, April 17, 2006 8:14 AM Subject: Base64 and Compression > Hello. > > I am currently using a JWS Web Service to provide an web interface to an EJB. > I know, JWS Services are simple and primitive, but it should be enough for > this simple redirection purpose. > > Below is message I posted one example how I am calling the Web Service from > the client side. Now, is there any way to the the Axis packages do automatic > base64 encoding and/or compression of the String data? > > Many thanks in advance, > > Jan > > > Code: > > public static String getMatrixChunk(String sessionID, int elements) throws > MalformedURLException, ServiceException, RemoteException { > Call call = getStandardCall("getMatrixChunk"); > call.addParameter("op1", XMLType.XSD_STRING, ParameterMode.IN ); > call.addParameter("op2", XMLType.XSD_INT, ParameterMode.IN ); > call.setReturnType(XMLType.XSD_STRING ); > // base64 decode the result > return (String)Base64.decodeToObject((String) call.invoke( new Object [] { > sessionID, new Integer(elements) })); > } > > private static Call getStandardCall(String methodName) throws > ServiceException, MalformedURLException { > Service service = new Service(); > Call call = (Call)service.createCall(); > > call.setTargetEndpointAddress(new URL(END_POINT)); > call.setOperationName(methodName); > > return call; > } > > > > > _ > versendet mit www.Oleco.de Mail - Anmeldung und Nutzung kostenlos! > Oleco www.netlcr.de jetzt auch mit SPAMSCHUTZ. > > > >
Re: Base64 and Compression
You could either: Use gzip compression: http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression Or just do getBytes() on the string and compress the byte array: http://javaalmanac.com/egs/java.util.zip/CompArray.html HTH, Robert http://www.braziloutsource.com/On 4/17/06, Jan Krumsiek <[EMAIL PROTECTED]> wrote:Hello. I am currently using a JWS Web Service to provide an web interface to an EJB. I know, JWS Services are simple and primitive, but it should be enough for this simple redirection purpose.Below is message I posted one example how I am calling the Web Service from the client side. Now, is there any way to the the Axis packages do automatic base64 encoding and/or compression of the String data?Many thanks in advance, JanCode:public static String getMatrixChunk(String sessionID, int elements) throws MalformedURLException, ServiceException, RemoteException {Call call = getStandardCall("getMatrixChunk");call.addParameter("op1", XMLType.XSD_STRING, ParameterMode.IN ); call.addParameter("op2", XMLType.XSD_INT, ParameterMode.IN );call.setReturnType(XMLType.XSD_STRING );// base64 decode the resultreturn (String)Base64.decodeToObject((String) call.invoke ( new Object [] { sessionID, new Integer(elements) }));}private static Call getStandardCall(String methodName) throws ServiceException, MalformedURLException {Service service = new Service();Call call = (Call)service.createCall(); call.setTargetEndpointAddress(new URL(END_POINT));call.setOperationName(methodName);return call;}_ versendet mit www.Oleco.de Mail - Anmeldung und Nutzung kostenlos!Oleco www.netlcr.de jetzt auch mit SPAMSCHUTZ.