SoapFault - 错误代码:SOAP-ENV:服务器错误字符串:允许的 134217728 字节的内存大小已耗尽(尝试分配 9758721 字节)
SoapFault - faultcode: SOAP-ENV:Server faultstring: Allowed memory size of 134217728 bytes exhausted (tried to allocate 9758721 bytes)
我正在 Android 中创建一个应用程序,它使用如下使用 ksoap2 库的 Magento SOAP Web 服务
@Override
protected Void doInBackground(Void... arg0) {
try {
SoapObject request = new SoapObject("urn:Magento", "catalogProductList");
request.addProperty("sessionId",sessionId );
env.setOutputSoapObject(request);
androidHttpTransport.call("", env); //EXCEPTION THROWN HERE
SoapObject soapResponse = (SoapObject) env.getResponse();
Log.d("catalog Product List".toUpperCase(), soapResponse.toString());
在上面的代码中,我调用了 catalogProductList
SOAP API 方法,该方法已在服务器上被覆盖,以在响应中包含标准字段以外的更多字段(更多字段,如产品描述和所有) 在 Android
中的 SQLite 中创建数据库
我在上面指出的行中遇到以下异常:
02-18 16:07:24.134: W/System.err(14614): SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 9758721 bytes)' faultactor: 'null' detail: null
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:137)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:140)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.Transport.parseResponse(Transport.java:129)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.parseResponse(HttpTransportSE.java:301)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:274)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113)
02-18 16:07:24.204: W/System.err(14614): at in.myproject.MainActivity$LoadDatabase.doInBackground(MainActivity.java:680)
02-18 16:07:24.204: W/System.err(14614): at in.myproject.MainActivity$LoadDatabase.doInBackground(MainActivity.java:1)
02-18 16:07:24.204: W/System.err(14614): at android.os.AsyncTask.call(AsyncTask.java:287)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-18 16:07:24.204: W/System.err(14614): at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:230)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-18 16:07:24.204: W/System.err(14614): at java.lang.Thread.run(Thread.java:856)
谁能帮我解决这个错误并获取产品列表。
注意: 我可以在 PHP 中看到上述 SOAP API 方法的响应,但是当我在 Android 上调用它时我收到上述错误。
错误来自 Magento 服务器。尝试加载大型集合时 运行 内存不足。您有几个选择:
- Increase the memory limit on the server,或
- Limit your collection
我正在 Android 中创建一个应用程序,它使用如下使用 ksoap2 库的 Magento SOAP Web 服务
@Override
protected Void doInBackground(Void... arg0) {
try {
SoapObject request = new SoapObject("urn:Magento", "catalogProductList");
request.addProperty("sessionId",sessionId );
env.setOutputSoapObject(request);
androidHttpTransport.call("", env); //EXCEPTION THROWN HERE
SoapObject soapResponse = (SoapObject) env.getResponse();
Log.d("catalog Product List".toUpperCase(), soapResponse.toString());
在上面的代码中,我调用了 catalogProductList
SOAP API 方法,该方法已在服务器上被覆盖,以在响应中包含标准字段以外的更多字段(更多字段,如产品描述和所有) 在 Android
我在上面指出的行中遇到以下异常:
02-18 16:07:24.134: W/System.err(14614): SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 9758721 bytes)' faultactor: 'null' detail: null
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:137)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:140)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.Transport.parseResponse(Transport.java:129)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.parseResponse(HttpTransportSE.java:301)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:274)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
02-18 16:07:24.204: W/System.err(14614): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113)
02-18 16:07:24.204: W/System.err(14614): at in.myproject.MainActivity$LoadDatabase.doInBackground(MainActivity.java:680)
02-18 16:07:24.204: W/System.err(14614): at in.myproject.MainActivity$LoadDatabase.doInBackground(MainActivity.java:1)
02-18 16:07:24.204: W/System.err(14614): at android.os.AsyncTask.call(AsyncTask.java:287)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-18 16:07:24.204: W/System.err(14614): at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:230)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-18 16:07:24.204: W/System.err(14614): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-18 16:07:24.204: W/System.err(14614): at java.lang.Thread.run(Thread.java:856)
谁能帮我解决这个错误并获取产品列表。
注意: 我可以在 PHP 中看到上述 SOAP API 方法的响应,但是当我在 Android 上调用它时我收到上述错误。
错误来自 Magento 服务器。尝试加载大型集合时 运行 内存不足。您有几个选择:
- Increase the memory limit on the server,或
- Limit your collection