Send XML to WebService
I create an XML and save it in a file
var xml:XML = myObject.xml;
file = new File(myObject.path);
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeUTFBytes("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xml);
fileStream.close();
Later I reopened it and send it
var file:File = new File(myObject.path);
var fileStream:FileS开发者_如何学运维tream = new FileStream();
fileStream.open(file, FileMode.READ);
var xmlText:String = fileStream.readUTFBytes(fileStream.bytesAvailable);
var call:Object = service.AirSave("username", "password", xmlText);
call.addResponder(responder);
And a part of my XML
<Gen Name="App1">
<Fam Name="Date">
<Peo>
<First>René</First>
<Last>Jean</Last>
</Peo>
<Peo>
<First>François</First>
<Last>Jean</Last>
</Peo>
</Fam>
</Gen>
Someone know why and how to fix it?
Thank youOk I find the problem.
The server save the content of the file in a database but SQL Server don't support UTF-8. So bye bye accent.
精彩评论