调用代码:
String name = "张三";
String[] args1 = new String[] {name};
String str = di.invokeMethod("http://localhost:5888/axis/services/GetArray_1?wsdl","getArray",args1);
调用过程中参数传递为乱码,用tcpmon监测结果:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/20
01/XMLSchema-instance">
<soapenv:Body>
<ns1:getArray soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encod
ing/" xmlns:ns1="http://testservice.sigsit">
<name xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org
/soap/encoding/">寮犱笁</name>
</ns1:getArray>
</soapenv:Body>
</soapenv:Envelope>
上面的name项为乱码
一般在java使用的字符集时ISO-8859-1,而在SOAP消息中使用的是UTF-8,可能问题出在这里,但怎么解决呢?
大家出现过这个问题没?
多谢!!!
--
FROM 159.226.40.*