[jboss-user] [EJB 3.0] - Re: best way to expose ejb3 as web service?

jaki do-not-reply at jboss.com
Mon Aug 18 03:14:13 EDT 2008


Hi again, 

Is it not possible to return a map/hashmap from the ejb web service? I'm using an axis client for that as below Call call    = (Call) service.createCall();
  |                    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
  |                    call.setOperationName(new QName("http://session.um.com/", "getAuc") );
  | 
  |                  
  |                    call.addParameter("arg0",
  |                                      org.apache.axis.Constants.XSD_INT,
  |                                      javax.xml.rpc.ParameterMode.IN);
  |                  
  |          
  |                    call.setReturnClass(HashMap.class);
  |                    HashMap ret =  (HashMap) call.invoke( new Object[] {"1"}

Thought it throws no error, the returned Map  never has any contents in them. Also, if instead of setReturnClass I try to use setReturnType(org.apache.axis.Constants.XSD_ANY) it gives me the below error:

could not find deserializer for type {http://www.w3.org/2001/XMLSchema}any

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170986#4170986

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170986



More information about the jboss-user mailing list