Skip to Content
avatar image
Former Member

I could not use "ArrayList" as return type in my WebService!?

I create a very simple WebService, the service provider is a simple EJB, it has one operation:

"public ArrayList getStringList();"

and the following is the method implementation:

public ArrayList getStringList() {

ArrayList list = new ArrayList();

list.add("1");

list.add("2");

list.add("3");

return list;

}

it's very simple! but when I generate the webservice based on this EJB and try to publish it to J2EE engine in NetWeaver Studio, I got the following error:

Caught exception during application deployment from SAP J2EE Engine's deploy service:

java.rmi.RemoteException: Cannot deploy application sap.com/TestWSApp.. Reason: Webservices deployment exception! The reason is: Error occured, trying to generate web services deployment files for application sap.com/TestWSApp. . The error refers to application: none, jar: , web service: .; nested exception is: java.lang.Exception: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices deployment exception! The reason is: Error occured, trying to generate web services deployment files for application sap.com/TestWSApp. . The error refers to application: none, jar: , web service: .

at com.sap.engine.services.webservices.server.deploy.common.WSAbstractDeployGenerator.generateDeployFiles(WSAbstractDeployGenerator.java:123)

Caused by: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices common deployment exception! The reason is: Unable to generate complex types. Additional info: not available

It seems that I could not use "ArrayList" as the return type , but ArrayList implements java.io.Serializable interface, I shall be able to use it in my sense, anyone

could give me some ideas about it?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 30, 2004 at 12:32 PM

    Hi Kevin,

    it should work, ArrayList is supported for service endpoints. Please have a look at the following documentation: http://help.sap.com/saphelp_nw04/helpdata/en/94/91d32be5b8f945a4122ac6119316df/content.htm

    Hope that helps.

    Best regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded