Hi again. I have modified code of my Handler and now i have included into in
such code:
| public boolean handleResponse(MessageContext msgContext) {
| try {
| logger.debug("CompressionHandler handleResponse");
| SOAPMessage
mss=((SOAPMessageContext)msgContext).getMessage();
| logger.debug("after getting message");
| logger.debug(mss.toString());
| org.apache.axis.MessageContext
mc=(org.apache.axis.MessageContext)msgContext;
| logger.debug("after cast to
org.apache.axis.MessageContext");
| logger.debug(mc.toString());
| ByteArrayOutputStream bos = new ByteArrayOutputStream();
| GZIPOutputStream gz = new GZIPOutputStream(bos);
| logger.debug("after creating Streams");
| Message msg =(Message) mss;
| mss.writeTo(System.out);
| msg.writeTo(System.out);
| gz.write(msg.getSOAPPartAsBytes());
| gz.close();
| bos.close();
| logger.debug("after closing streams");
| Message msg2 = new Message(bos.toByteArray());
|
| mc.setResponseMessage(msg2);
|
| } catch (Exception e) {
| e.printStackTrace();
| logger.error(e);
| return false;
| }
| return true;
| }
|
There are a lot of unuseful code here but the problems is not in that. I can't
compress the message. This is the part of my logfile output:
| ...
| 2005-04-04 12:55:14,890 INFO [STDOUT] <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soapenv:Body>
| <ns1:getComplexResponse xmlns:ns1="http://interfaces.zenith.ru">
| <getComplexReturn>
| <username>sigma</username>
| <cod>6004955</cod>
| </getComplexReturn>
| </ns1:getComplexResponse>
| </soapenv:Body>
| </soapenv:Envelope>
| 2005-04-04 12:55:14,890 ERROR [org.apache.axis.MessagePart] Cannot convert
3 to bytes
| 2005-04-04 12:55:14,890 INFO [STDOUT] java.lang.NullPointerException
| 2005-04-04 12:55:14,890 INFO [STDOUT] at ...
|
This part of output was produced by this code
| msg.writeTo(System.out);
| gz.write(msg.getSOAPPartAsBytes());
|
So I don't know whats wrong? Maybe this is the problem of JBOSS axis impl? I'm
using jboss4.0. I'm saying this because method
| //msg instanceof org.apache.axis.Message
| msg.getContentLength();
|
throwing NullPointerException too.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872518#3872518
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872518
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user