There is something that I am not figuring out. Some characters just are misinterpreted...
anyway... I change to SOAPMessage and set the default encoding to UTF-8 (from windows-1252
on Windows)... now it really works!
for JVM:-Dfile.encoding=UTF-8
| private Dispatch<SOAPMessage> dispatch;
|
| private MessageFactory messageFactory;
|
| /* package */ DispatchHandler(Dispatch<SOAPMessage> dispatch) throws Exception
| {
| this.dispatch = dispatch;
|
| messageFactory = MessageFactory.newInstance();
| }
|
| public SOAPMessage createRequest(String request) throws Exception
| {
| ByteArrayInputStream stream = new ByteArrayInputStream(request.getBytes());
| SOAPMessage message = messageFactory.createMessage(null, stream);
| stream.close();
| return message;
| }
|
| public String createResponse(SOAPMessage message) throws Exception
| {
| ByteArrayOutputStream stream = new ByteArrayOutputStream(1024);
| message.writeTo(stream);
| String response = stream.toString();
| stream.close();
| return response;
| }
|
| public String invoke(String request) throws Exception
| {
| try
| {
| SOAPMessage requestMessage = createRequest(request);
|
| SOAPMessage responseMessage = dispatch.invoke(requestMessage);
|
| return createResponse(responseMessage);
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141630#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...