/****************************************************************************** * Echo.java * ****************************************************************************/ /* J_LZ_COPYRIGHT_BEGIN ******************************************************* * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * J_LZ_COPYRIGHT_END *********************************************************/ package org.openlaszlo.test.xmlrpc; import java.util.*; public class Echo { public Echo() { } public String echo(String val) { return val + " :: "+val.length(); } public String echo2(String val, Vector vec) { String ustr = ( String )vec.elementAt(0); byte p[]; try { //p = v[i].getBytes("UTF-8"); // WORKS for PROXIED POST p = ustr.getBytes("ISO-8859-1"); // OK for GET, proxied and direct String rstr = new String(p, 0, p.length, "UTF-8"); return "val="+val + " :: "+val.length()+" vec[0]="+rstr+" :: "+ rstr.length(); } catch (Exception e) { return "caught exception "+e; } } }