If using Apache ws-xmlrpc you get this error in server side:
1 2 3 4 5 6 7 |
ERROR server.XmlRpcErrorLogger: java.io.BufferedOutputStream cannot be cast to java.io.ByteArrayOutputStream java.lang.ClassCastException: java.io.BufferedOutputStream cannot be cast to java.io.ByteArrayOutputStream at org.apache.xmlrpc.webserver.Connection.writeResponse(Connection.java:271) at org.apache.xmlrpc.webserver.ConnectionServer.writeResponse(ConnectionServer.java:54) at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:225) at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68) |
It is because you have to set to false (or just do NOT set to true the optional content length configuration):
1 |
serverConfig.setContentLengthOptional(false); |