You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tami Wright <tt...@myfamilyinc.com> on 2004/11/01 09:15:30 UTC

RE: Axis blows up in AbstractXMLEncoder when serializing a complex object array of over 1000 elements.

Okay, figured out the problem.  A third-party commercial app (a service
that my web-service is a client to) was returning munged data. There
should not be this problem inside this app, so apparently the problem
was not Axis' fault.  I wrote a little utility class (using a couple of
lines of code from the AbstractXMLEncoder inside of Axis) to do a check
on my strings that are going on the wire to ensure that they are XML
friendly so that they can be appropriately serialized/deserialized.  If
they aren't, this object makes thems so.  Here is the code for anyone
interested:


/**
 * Created by IntelliJ IDEA.
 * User: ttwright
 * Date: Oct 31, 2004
 * Time: 11:49:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class XMLFriendlyString
{

    public String getXMLFriendlyString(String unfriendlyString)
    {
        char[] characters = unfriendlyString.toCharArray();
        char character;
        StringBuffer stringBuf = new
StringBuffer(unfriendlyString.length());

        for (int i = 0; i < characters.length; i++)
        {
            character = characters[i];
            if (character < 0x20)
                character = ' ';
            stringBuf.append(character);
        }
        return stringBuf.toString();
    }
}


-----Original Message-----
From: Tami Wright [mailto:ttwright@myfamilyinc.com] 
Sent: Friday, October 29, 2004 3:40 PM
To: axis-user@ws.apache.org
Subject: RE: Axis blows up in AbstractXMLEncoder when serializing a
complex object array of over 1000 elements.

Hi,

Thanks for responding.  I changed the heap size for Tomcat and shutdown
TCPMon and am still getting the same error.

Tami 

-----Original Message-----
From: Greg Michalopoulos [mailto:gmichalopoulos@d2hawkeye.com]
Sent: Friday, October 29, 2004 2:51 PM
To: axis-user@ws.apache.org
Subject: RE: Axis blows up in AbstractXMLEncoder when serializing a
complex object array of over 1000 elements.

I found that tcpmon uses a lot of memory, so if you are using that
you'll
need to increase the heap size when starting tcpmon.   

-----Original Message-----
From: Tami Wright [mailto:ttwright@myfamilyinc.com]
Sent: Friday, October 29, 2004 4:35 PM
To: axis-user@ws.apache.org
Subject: Axis blows up in AbstractXMLEncoder when serializing a complex
object array of over 1000 elements.

Hi All,

Anyone ever had problems with Axis (1.2 beta) blowing up when trying to
return a complex object containing an array of 1000 elements or so?  I
am and I wondered if it was a bug.  If so, where do I go to file a bug
report?

Thanks,

Tami