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

Discussion in 'XML' started by magnolio, Mar 3, 2005.

  1. magnolio

    magnolio Guest

    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>
    magnolio, Mar 3, 2005
    #1
    1. Advertising

  2. magnolio wrote:

    > 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.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Mar 4, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Navanith

    UTF-8 & ISO-8859-1

    Navanith, Jan 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    362
    Fred Chateau
    Jan 5, 2004
  2. Franck DARRAS
    Replies:
    12
    Views:
    620
    Jim Higson
    Aug 23, 2004
  3. Peter Jacobi
    Replies:
    13
    Views:
    829
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Aug 3, 2004
  4. JuanDG

    change encoding from UTF-8 to ISO-8859-1

    JuanDG, Feb 18, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    172
    JuanDG
    Feb 18, 2005
  5. Frédéric LAMBOUR

    How do i change utf-8 charset to iso-8859-1 on webservice response?

    Frédéric LAMBOUR, Oct 9, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    156
    Frédéric LAMBOUR
    Oct 9, 2006
Loading...

Share This Page