这是一个天气预报的Webservice
http://www.ayandy.com/Service.asmx?WSDL
POST /Service.asmx HTTP/1.1\r\nContent-Type: text/xml;
charset=utf-8
SOAPAction: "http://tempuri.org/getWeatherbyCityName"
Host: www.ayandy.com
Content-Length: 382
Expect: 100-continue
<?xml version="1.0" encoding="utf-16"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getWeatherbyCityName xmlns="http://tempuri.org/"><theCityName>南京</theCityName><theDayFlag>Today</theDayFlag></getWeatherbyCityName></soap:Body></soap:Envelope>我用SOCEKT实现直接调用Webservice,
到底怎么编码呀,是先把xml文件编码成UTF-16,然后再把整个请求编码成UTF-8吗,还是只把中文的地方进行编码?
求详解,谢谢!!!