Web Service change UTF-8 to ISO-8859-1

M

magnolio

THE PROBLEM
**************************************************************
i need to send a xml content in a web service, but i use latin american
charset.
HOW TO CHANGE THE CHARSET??
MY CODE:
***************************************************************
private static Element getEmployeeElement(String afp, String
usuario,String clave,String operacion, String cuspp){
Document doc = new XMLDocument();
Element elAdd = doc.createElement( "solSeccionIV");

Element elA = doc.createElement( "afp");
Element elB = doc.createElement( "usuario");
Element elC = doc.createElement("clave");
Element elD = doc.createElement( "operacion");
Element elE = doc.createElement( "cuspp");

elA.appendChild(doc.createTextNode(afp));
elB.appendChild(doc.createTextNode(usuario));
elC.appendChild(doc.createTextNode(clave));
elD.appendChild(doc.createTextNode(operacion));
elE.appendChild(doc.createTextNode(cuspp));

elAdd.appendChild(elA);
elAdd.appendChild(elB);
elAdd.appendChild(elC);
elAdd.appendChild(elD);
elAdd.appendChild(elE);
doc.appendChild(elAdd);
return doc.getDocumentElement();
}
THE RESULT:
*************************************************************
<mensaje>No existe la solicitud en estado "Cotizada" ó "En
elección".</mensaje>
 
M

Martin Honnen

magnolio said:
THE PROBLEM
**************************************************************
i need to send a xml content in a web service, but i use latin american
charset.
HOW TO CHANGE THE CHARSET??
MY CODE:
***************************************************************
private static Element getEmployeeElement(String afp, String
usuario,String clave,String operacion, String cuspp){
Document doc = new XMLDocument();
Element elAdd = doc.createElement( "solSeccionIV");
return doc.getDocumentElement();
}
THE RESULT:
*************************************************************
<mensaje>No existe la solicitud en estado "Cotizada" ó "En
elección".</mensaje>

Looks like Java to me, but I am not sure which DOM you are trying to use
so perhaps tell us some more details, whether you use Java, which DOM
that is. Then it might be possible to tell you how to serialize the
object model in a specific encoding.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top