I'm almost sure nobody here will be able to help me. But I'm desperated. This is part of my final work on bachelors degree and I can't get it to work.
I wrote a code in Java and this code submits a string to a server ( maintained by a lab in my university which provides this service), it processes my data and replies with the new data that I want.
All works fine, except for one thing.. Sometimes I need to submit strings with ISO-8859-1 characters ( like "é" or "ã" ) and those characters get to the server all messed up.
My problem is that the whole submission data process is made with WSDL/RMI and I know nothing about how it works.
I just followed a wizard on Eclipse and it created a class that has the methods that I want (imported from the server). When I call the one I want it prepares my string and send it to the server through an apache call object.
I really don't know what I should do to fix it. I tried setting the encoding of the call object using :
_call.setEncodingStyle("ISO-8859-1");
But no success.
Here is the code of the method that does the call.
public int runTask(java.lang.String userName, java.lang.String password, java.lang.String language, java.lang.String linguisticInfo, java.lang.String inText) throws java.rmi.RemoteException
{
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[1]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://fextwswrapper", "runTask"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {userName, password, language, linguisticInfo, inText});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return ((java.lang.Integer) _resp).intValue();
} catch (java.lang.Exception _exception) {
return ((java.lang.Integer) org.apache.axis.utils.JavaUtils.convert(_resp, int.class)).intValue();
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
If someone could explain me what is happening or a fix it. I would extremely appreciate.
Thanks a lot!