cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bimargul...@gmail.com>
Subject Re: How to pass a HashMap
Date Mon, 25 Feb 2008 15:47:52 GMT
The use of HashMap as a JAX-WS wrapper type may be a problem. Let me try the
Map<x,y> experiment in my testbed.

On Mon, Feb 25, 2008 at 10:29 AM, Li, Weiye <Weiye.Li@stjude.org> wrote:

> I think I may have to declare .aegis.xml.
> It was my 2nd try (I mean, use Map only). I did use Map<Integer, Employee>
> on my first try and the outcome is the same: empty map returned.
>
> On 2/24/08 12:09 PM, "Benson Margulies" <bimargulies@gmail.com> wrote:
>
> It does work. But you have to tell it what's in the map. Either declare
> the
> type as
>
> Map<A,B>, or use a .aegis.xml file to tell it.
>
> > >
> > >
> > >
> > > @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();
> > >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message