请求都是UTF-8编码,但是传入后变成了0xe90xac0x8a0xe9[0xba],请问各位大神该如何处理?代码如下:
PostMethod postMethod = new PostMethod(wsdlLocation);
String soapRequestData = buildRequestXmlData(patameterMap);
byte[] bytes = soapRequestData.getBytes("utf-8");
InputStream inputStream = new ByteArrayInputStream(bytes, 0, bytes.length);
RequestEntity requestEntity = new InputStreamRequestEntity(inputStream, bytes.length,
"application/soap+xml; charset=utf-8");
postMethod.setRequestEntity(requestEntity);
HttpClient httpClient = new HttpClient();
int statusCode = httpClient.executeMethod(postMethod);
soapResponseData = postMethod.getResponseBodyAsString();
认证高级PHP讲师