473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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>

Jul 20 '05 #1
1 2101


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/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fadi | last post by:
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted...
5
by: John | last post by:
Hi I am trying to get web reference to my first (!) web service which is on a remote host. I am getting the following error; Server Error in '/' Application. Runtime Error Description: An...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
1
by: BeckyB00 | last post by:
Slightly different situation from the question of the 11/18/05 but the same error. (I'm just learning about web services so this is based on a 'quick tutorial') I'm running a web service using...
2
by: BluNuit | last post by:
I have a simple c# app that calls a Java (AXIS) web service to perform some operations. The call works fine (the java code fires and the operations are executed), but the response is always null. ...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
0
by: nappingcub | last post by:
This is my first time coding a web service in .NET and ran into a slight snag that I was hoping that anyone could help me out on. I'm using the generic Hello World web service that is stubbed out on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.