Skip to main content

Axis and Unicode

1 reply [Last post]
awumbawe
Offline
Joined: 2010-06-07
Points: 0

Hi, I have this code, and I don't know why if I use typical Spanish words is not working, I mean if I use 'ñ' or 'á', 'é'... What should I do?

import javax.xml.namespace.QName;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class translate {

public static void main(String[] args) throws Exception {

String endpoint = "http://siuc05.si.ehu.es/cgi-bin/matxin/translate.cgi";
String uri = "http://siuc05.si.ehu.es/MATXIN";

Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(endpoint);
call.setOperationName(new QName(uri, "EsEu"));

String ret = (String)call.invoke(new Object[] { "tamaño" });

System.out.println(ret);

}
}

With this code the web service is only taking the word "tama" and not the word "tamaño", is because the 'ñ' but I have no idea how to fix it.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
awumbawe
Offline
Joined: 2010-06-07
Points: 0

Someone please?

It has to be a stupid mistake...