Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache SOAP 2.x support for java.util.List  RSS feed

 
Gerry Quan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using WSAD IE 5.0.2 to write a web service to enable a SOAP client to access EJBs.

I am able to call an EJB that returns a simple data type but i get the following error when I try to call an EJB that returns a java.util.List object. Does anyone know if WSAD/Apache SOAP 2.x supports the List data type? I'm thinking that I will need to use a Vector instead. Appreciate any feedback.

org.apache.wsif.WSIFException: [Attributes={}] [faultCode=SOAP-ENV:Server] [faultString=java.lang.IllegalArgumentException: Tried to pass a 'class java.util.ArrayList' to VectorSerializer] [faultActorURI=/GerrySampleWeb/servlet/rpcrouter] [DetailEntries=
[(0)=<stackTrace>[SOAPException: faultCode=SOAP-ENV:Server; msg=java.lang.IllegalArgumentException: Tried to pass a &amp;apos;class java.util.ArrayList&amp;apos; to VectorSerializer]
at com.ibm.soap.providers.impl.WASStatelessEJBProviderImpl.invoke(WASStatelessEJBProviderImpl.java:260)
at org.apache.soap.server.http.RPCRouterServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1011)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:552)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:198)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:212)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
</stackTrace>]
] [FaultEntries=]
at com.usaa.imco.investment.bs.beneficiary.EnterpriseMemberBeneficiaryServiceSOAPProxy.execute(EnterpriseMemberBeneficiaryServiceSOAPProxy.java:241)
at com.usaa.imco.investment.bs.beneficiary.EnterpriseMemberBeneficiaryServiceSOAPProxy.getBeneficiaryRelationships(EnterpriseMemberBeneficiaryServiceSOAPProxy.java:83)
at com.usaa.imco.investment.bs.beneficiary.BeneficiaryRelationships.main(BeneficiaryRelationships.java:25)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion, for maximum flexibility and minimum overhead you should never return a Vector or List - instead, return an array. The collections API has very convenient toArray() methods.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!