You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by ashish ranjan <ar...@cs.fiu.edu> on 2001/12/26 00:12:18 UTC

SOAP client giving outofmemoryerror

Hi,
   I am trying to send > 10MB of data using soap. At the client side i am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)




Re: returning null object

Posted by Chris Malley <cm...@pixelzoom.com>.
See the SOAP 1.2 spec at http://www.w3.org/TR/2001/WD-soap12-20010709.
As stated towards the end of Section 5.1:

  "9. A NULL value or a default value MAY be represented by omission 
  of the accessor element. A NULL value MAY also be indicated by 
  an accessor element containing the attribute xsi:null with value 
  '1' or possibly other application-dependent attributes and values."

So the treatment of 'null' is left up to the implementation,
since "MAY" indicates that these are only suggestions.
I believe that Apache SOAP 2.2 takes the 'xsi:null' approach.

-Chris

John Mani wrote:
> 
> Java APIs that return Java objects sometimes return null to signify certain
> conditions (like lack of data)
> Does SOAP allow for such scenarios - i.e., a null representation of an
> object ?
> 
> If so, does Apache SOAP allow this ?
> 
> thanx
> -john

Re: returning null object

Posted by Chris Malley <cm...@pixelzoom.com>.
See the SOAP 1.2 spec at http://www.w3.org/TR/2001/WD-soap12-20010709.
As stated towards the end of Section 5.1:

  "9. A NULL value or a default value MAY be represented by omission 
  of the accessor element. A NULL value MAY also be indicated by 
  an accessor element containing the attribute xsi:null with value 
  '1' or possibly other application-dependent attributes and values."

So the treatment of 'null' is left up to the implementation,
since "MAY" indicates that these are only suggestions.
I believe that Apache SOAP 2.2 takes the 'xsi:null' approach.

-Chris

John Mani wrote:
> 
> Java APIs that return Java objects sometimes return null to signify certain
> conditions (like lack of data)
> Does SOAP allow for such scenarios - i.e., a null representation of an
> object ?
> 
> If so, does Apache SOAP allow this ?
> 
> thanx
> -john

returning null object

Posted by John Mani <jo...@sixthdimension.com>.
Java APIs that return Java objects sometimes return null to signify certain
conditions (like lack of data)
Does SOAP allow for such scenarios - i.e., a null representation of an
object ?

If so, does Apache SOAP allow this ?

thanx
-john



returning null object

Posted by John Mani <jo...@sixthdimension.com>.
Java APIs that return Java objects sometimes return null to signify certain
conditions (like lack of data)
Does SOAP allow for such scenarios - i.e., a null representation of an
object ?

If so, does Apache SOAP allow this ?

thanx
-john



JAX-RPC

Posted by Ajit Ponkshe <aj...@patni.com>.
Hi all,
   I am trying to find a sample code for JAX-RPC. I have tried the sun site
but did not find it. Will someone please tell me where it can be found. Any
help would be appreciated.

-Ajit Ponkshe
Sr. Software Eng.
PCS India Ltd.


JAX-RPC

Posted by Ajit Ponkshe <aj...@patni.com>.
Hi all,
   I am trying to find a sample code for JAX-RPC. I have tried the sun site
but did not find it. Will someone please tell me where it can be found. Any
help would be appreciated.

-Ajit Ponkshe
Sr. Software Eng.
PCS India Ltd.


RE: SOAP client giving outofmemory error / example

Posted by Tim Bertrand <ti...@capeclear.com>.
Hello,

You can also see a case study of a real world implementation of this
concept (SOAP w/ attachments) by visiting the following link:

http://www.capeclear.com/customers/rsco.pdf

Cheers, - Tim


-----Original Message-----
From: graham glass [mailto:graham-glass@mindspring.com] 
Sent: 26 December 2001 20:07
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror

hi there,

SOAP w/ attachments allows you to easily send as much
data as you want between soap endpoints without loading
it into memory. it looks just like regular RPC, and
attachments can be mingled with regular arguments like this:

endpoint.invoke( 5, "hi", new MIMEData( "url-of-source" ) );

many SOAP implementations support this, including our
own GLUE product, a free download from http://www.themindelectric.com.

hope this helps,

cheers,
graham

-----Original Message-----
From: Abhinav Gupta [mailto:dev4abhi@yahoo.com]
Sent: Wednesday, December 26, 2001 4:32 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror


Hi Ashish,

	You will probably need to implement soap over ftp (Just
kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i
am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message
is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)


 _________________________________________________________ Do You
Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: SOAP client giving outofmemory error / example

Posted by Tim Bertrand <ti...@capeclear.com>.
Hello,

You can also see a case study of a real world implementation of this
concept (SOAP w/ attachments) by visiting the following link:

http://www.capeclear.com/customers/rsco.pdf

Cheers, - Tim


-----Original Message-----
From: graham glass [mailto:graham-glass@mindspring.com] 
Sent: 26 December 2001 20:07
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror

hi there,

SOAP w/ attachments allows you to easily send as much
data as you want between soap endpoints without loading
it into memory. it looks just like regular RPC, and
attachments can be mingled with regular arguments like this:

endpoint.invoke( 5, "hi", new MIMEData( "url-of-source" ) );

many SOAP implementations support this, including our
own GLUE product, a free download from http://www.themindelectric.com.

hope this helps,

cheers,
graham

-----Original Message-----
From: Abhinav Gupta [mailto:dev4abhi@yahoo.com]
Sent: Wednesday, December 26, 2001 4:32 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror


Hi Ashish,

	You will probably need to implement soap over ftp (Just
kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i
am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message
is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)


 _________________________________________________________ Do You
Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: SOAP client giving outofmemoryerror

Posted by graham glass <gr...@mindspring.com>.
hi there,

SOAP w/ attachments allows you to easily send as much
data as you want between soap endpoints without loading
it into memory. it looks just like regular RPC, and
attachments can be mingled with regular arguments like this:

endpoint.invoke( 5, "hi", new MIMEData( "url-of-source" ) );

many SOAP implementations support this, including our
own GLUE product, a free download from http://www.themindelectric.com.

hope this helps,

cheers,
graham

-----Original Message-----
From: Abhinav Gupta [mailto:dev4abhi@yahoo.com]
Sent: Wednesday, December 26, 2001 4:32 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror


Hi Ashish,

	You will probably need to implement soap over ftp (Just kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)


 _________________________________________________________ Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



RE: SOAP client giving outofmemoryerror

Posted by graham glass <gr...@mindspring.com>.
hi there,

SOAP w/ attachments allows you to easily send as much
data as you want between soap endpoints without loading
it into memory. it looks just like regular RPC, and
attachments can be mingled with regular arguments like this:

endpoint.invoke( 5, "hi", new MIMEData( "url-of-source" ) );

many SOAP implementations support this, including our
own GLUE product, a free download from http://www.themindelectric.com.

hope this helps,

cheers,
graham

-----Original Message-----
From: Abhinav Gupta [mailto:dev4abhi@yahoo.com]
Sent: Wednesday, December 26, 2001 4:32 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP client giving outofmemoryerror


Hi Ashish,

	You will probably need to implement soap over ftp (Just kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)


 _________________________________________________________ Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



RE: SOAP client giving outofmemoryerror

Posted by ashish ranjan <ar...@cs.fiu.edu>.
Hi,
Thanks for the response. The outofmemory error is due to the JVM
limitation. I need to send 5-10 MB of image data to an applet.

i have following options:
1.plain cgi
2.Com/dcom
3.Corba

I wanted the things to be simple and hence chose SOAP.
I think we should be able to send large chunks of data over soap.
should i abandon SOAP??

ashish



On Wed, 26 Dec 2001, Abhinav Gupta wrote:

> Hi Ashish,
>
> 	You will probably need to implement soap over ftp (Just kidding). If you
> are sending that kind of data in a RPC call than there is something
> fundamentally wrong with your design.
>
> Abhinav Gupta
> FirstRain Inc. NY
>
>
> -----Original Message-----
> From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
> Sent: Tuesday, December 25, 2001 6:12 PM
> To: soap-user@xml.apache.org
> Subject: SOAP client giving outofmemoryerror
>
>
> Hi,
>    I am trying to send > 10MB of data using soap. At the client side i am
> getting outofmemoryerror when the call object is invoked.
> How to build a client which can receive huge data??? The error message is
> given below.
> Any help will be appreciated....
>
> Thanks,
> Ashish
>
> Exception in xhiead "main" java.lang.OutOfMtmoryError
>         ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
> Compiled
>  Code)
>         at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
> Code)
>         at java.io.StringWriter.write(StringWriter.java:96)
>         at java.io.PrintWriter.newLine(PrintWriter.java:240)
>         at java.io.PrintWriter.println(PrintWriter.java:391)
>         at java.io.PrintWriter.println(PrintWriter.java:486)
>         at
> org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
> piled Code)
>         at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
>         at org.apache.soap.rpc.Call.invoke(Call.java:212)
>         at soapclient1.main(soapclient1.java:66)
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>


RE: SOAP client giving outofmemoryerror

Posted by ashish ranjan <ar...@cs.fiu.edu>.
Hi,
Thanks for the response. The outofmemory error is due to the JVM
limitation. I need to send 5-10 MB of image data to an applet.

i have following options:
1.plain cgi
2.Com/dcom
3.Corba

I wanted the things to be simple and hence chose SOAP.
I think we should be able to send large chunks of data over soap.
should i abandon SOAP??

ashish



On Wed, 26 Dec 2001, Abhinav Gupta wrote:

> Hi Ashish,
>
> 	You will probably need to implement soap over ftp (Just kidding). If you
> are sending that kind of data in a RPC call than there is something
> fundamentally wrong with your design.
>
> Abhinav Gupta
> FirstRain Inc. NY
>
>
> -----Original Message-----
> From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
> Sent: Tuesday, December 25, 2001 6:12 PM
> To: soap-user@xml.apache.org
> Subject: SOAP client giving outofmemoryerror
>
>
> Hi,
>    I am trying to send > 10MB of data using soap. At the client side i am
> getting outofmemoryerror when the call object is invoked.
> How to build a client which can receive huge data??? The error message is
> given below.
> Any help will be appreciated....
>
> Thanks,
> Ashish
>
> Exception in xhiead "main" java.lang.OutOfMtmoryError
>         ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
> Compiled
>  Code)
>         at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
> Code)
>         at java.io.StringWriter.write(StringWriter.java:96)
>         at java.io.PrintWriter.newLine(PrintWriter.java:240)
>         at java.io.PrintWriter.println(PrintWriter.java:391)
>         at java.io.PrintWriter.println(PrintWriter.java:486)
>         at
> org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
> piled Code)
>         at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
>         at org.apache.soap.rpc.Call.invoke(Call.java:212)
>         at soapclient1.main(soapclient1.java:66)
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>


RE: SOAP client giving outofmemoryerror

Posted by Abhinav Gupta <de...@yahoo.com>.
Hi Ashish,

	You will probably need to implement soap over ftp (Just kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: SOAP client giving outofmemoryerror

Posted by Abhinav Gupta <de...@yahoo.com>.
Hi Ashish,

	You will probably need to implement soap over ftp (Just kidding). If you
are sending that kind of data in a RPC call than there is something
fundamentally wrong with your design.

Abhinav Gupta
FirstRain Inc. NY


-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Tuesday, December 25, 2001 6:12 PM
To: soap-user@xml.apache.org
Subject: SOAP client giving outofmemoryerror


Hi,
   I am trying to send > 10MB of data using soap. At the client side i am
getting outofmemoryerror when the call object is invoked.
How to build a client which can receive huge data??? The error message is
given below.
Any help will be appreciated....

Thanks,
Ashish

Exception in xhiead "main" java.lang.OutOfMtmoryError
        ajava.lang.StringBuffer.expandCapacity(StringBuffer.java:204,
Compiled
 Code)
        at java.lang.StringBuffer.append(StringBuffer.java:396, Compiled
Code)
        at java.io.StringWriter.write(StringWriter.java:96)
        at java.io.PrintWriter.newLine(PrintWriter.java:240)
        at java.io.PrintWriter.println(PrintWriter.java:391)
        at java.io.PrintWriter.println(PrintWriter.java:486)
        at
org.apache.soap.util.IOUtils.getStringFromReader(IOUtils.java:81, Com
piled Code)
        at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:169)
        at org.apache.soap.rpc.Call.invoke(Call.java:212)
        at soapclient1.main(soapclient1.java:66)



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com