Client client = ClientProxy.getClient(tService);
client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); client.getOutFaultInterceptors().add(new FaultOutInterceptor());
Map<String, List<String>> headers = new HashMap<String, List<String>>(); headers.put("Content-Type", Arrays.asList("text/xml;charset=UTF-8"));
// Add HTTP headers to the web service request client.getRequestContext().put(Message.PROTOCOL_HEADERS, headers);
输出报文可以加这个: System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump","true");
|