axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LE BRIS Damien (JIRA)" <>
Subject [jira] Created: (AXIS-2778) Out of Memory - SOAPEnvelope.toString - Client part
Date Fri, 27 Feb 2009 12:53:12 GMT
Out of Memory - SOAPEnvelope.toString - Client part

                 Key: AXIS-2778
             Project: Axis
          Issue Type: Bug
         Environment: Host: sun4u sparc SUNW,Sun-Fire-V890
Java version: "1.5.0_13" build b05
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
Name: org/apache/axis
Implementation-Title: Apache Axis
Implementation-Version: 1.4 1855 April 22 2006
Implementation-Vendor: Apache Web Services
            Reporter: LE BRIS Damien
            Priority: Critical


I have an out of memory problem when I try to transform a SOAPEnvelope in a String. It's a
200MB File.
The memory is define to: -Xmx3300M -Xms3300M

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Server VM (build 1.5.0_13-b05, mixed mode)

Import (axis):
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPEnvelope;

My code:
	// Appel du service
	Service service = new Service();
	Call call = (Call) service.createCall();	
	call.setProperty( Call.SOAPACTION_USE_PROPERTY, new Boolean( true ) );
	call.setProperty( Call.SOAPACTION_URI_PROPERTY, soapAction);

	// on récupère le fichier xml request passé en argument
	FileInputStream fluxXml = new FileInputStream(args[1]);
	SOAPEnvelope req = new SOAPEnvelope(fluxXml);

	// invocation du webservice
	SOAPEnvelope ret = call.invoke(req);

	/** **** ecriture de la reponse dans le fichier de sortie ***** */

	/* recuperation du chemin du repertoire de sortie */
	// construction du nom du fichier de sortie
	String repDest = System.getenv("REFTERM_REP_DEST");
	File fichierDest = buildOutPutFileName(repDest, "terminalListResponse");

	/* creation et ecriture de la reponse */
	BufferedWriter reponse = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fichierDest)));
	reponse.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");

Out of Memory when:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.lang.AbstractStringBuilder.expandCapacity(
        at java.lang.AbstractStringBuilder.append(
        at java.lang.StringBuffer.append(
        at org.apache.axis.encoding.SerializationContext.endElement(
        at org.apache.axis.message.SAXOutputter.endElement(
        at org.apache.axis.message.SAX2EventRecorder.replay(
        at org.apache.axis.message.MessageElement.output(
        at org.apache.axis.message.SOAPBody.outputImpl(
        at org.apache.axis.message.SOAPEnvelope.outputImpl(
        at org.apache.axis.message.MessageElement.output(
        at org.apache.axis.message.MessageElement.getAsString(
        at org.apache.axis.message.MessageElement.toString(
        at com.bouygtel.newcom.referentiel.terminaux.AcquisitionRefTerminaux.main(

If you have an information about this problem, I take it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message