I reported the same issue in 2.0.3 a while back, and I did have my Map specified as Map<String, String>. (It was a service that had previously worked under XFire.)
I got no response, so I switched to JAXB and just wrapped the Map inside a bean. -----Original Message----- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 10:20 AM To: cxf-user@incubator.apache.org Subject: Re: How to pass a HashMap Please try my suggestion of declaring Map<Type,Type> in your SEI instead of just 'map'. On Mon, Feb 25, 2008 at 10:04 AM, Li, Weiye <[EMAIL PROTECTED]> wrote: > Should be the latest one:2.0.4 > Thanks for the reply. > > > On 2/23/08 11:49 AM, "Benson Margulies" <[EMAIL PROTECTED]> wrote: > > What version of CXF have you got? > > > On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye <[EMAIL PROTECTED]> wrote: > > > The CXF document says that Aegis data binding can even works on Map. I > > tried this, but it always return an empty one. Here's my testing codes. > Did > > I miss something? Or I need to write special config file? > > > > > > > > > > @WebService(name="EmicroManager", targetNamespace="http://test.emicro ") > > @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle= > > ParameterStyle.WRAPPED) > > public interface EmicroService { > > @WebMethod > > @RequestWrapper(className="test.model.Employee", > > localName="employee", targetNamespace=" > > http://test.emicro/types ") > > @Oneway > > public void addEmployee(Employee emp); > > > > > > @WebMethod(operationName="getEmployeesAsMap") > > @ResponseWrapper(className="java.util.HashMap", > > localName="EmployeesMap", targetNamespace=" > > http://test.emicro/types") > > public Map getEmployeesMap(); > > > > } > > > > > > > > > > > > public static void main(String args[]) throws Exception { > > > > JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > > > > factory.setServiceClass(test.EmicroService.class); > > > > factory.setAddress("http://localhost:9080/emicro-ws/EmicroService > "); > > > > factory.getServiceFactory().setDataBinding(new AegisDatabinding()); > > > > > > > > EmicroService client = (EmicroService)factory.create(); > > > > > > > > // add 2 employees here, then > > > > > > > > Map<Integer, Employee> emap = client.getEmployeesMap(); > > > > logger.info(emap); > > > > > > > > System.exit(0); > > > > } > > > > > > > > The backend configuration is just following the CXF tutorial > > <bean id="aegisBean" class=" > > org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype"/> > > > > > > > > <bean id="jaxws-and-aegis-service-factory" > > > > class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" > > scope="prototype"> > > > > <property name="dataBinding" ref="aegisBean" /> > > > > <property name="serviceConfigurations"> > > > > <list> > > > > <bean class=" > > org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" /> > > > > <bean class=" > > org.apache.cxf.aegis.databinding.AegisServiceConfiguration" /> > > > > <bean class=" > > org.apache.cxf.service.factory.DefaultServiceConfiguration" /> > > > > </list> > > > > </property> > > > > </bean> > > > > > > > > > > > > <bean id="emicro" class="org.stjude.ri.emicro.ws.EmicroServiceImpl" > > /> > > > > > > > > <jaxws:endpoint id="helloWorld" implementor="#emicro" > > address="/EmicroService"> > > > > <jaxws:serviceFactory> > > > > <ref bean='jaxws-and-aegis-service-factory' /> > > > > </jaxws:serviceFactory> > > > > </jaxws:endpoint> > > > > > > > > > > > > Any advice? Thanks > > > > > > > > > >