Hello All,
I'm currently trying to write RS service accepting 2 objects of different
types as parameters:
ex. code:
@WebService(serviceName="org.apache.openmeetings.webservice.UserWebService")
@Features(features = "org.apache.cxf.feature.LoggingFeature")
@Produces({MediaType.APPLICATION_JSON})
@Path("/user")
public class UserWebService {
@POST
@Path("/hash")
public ServiceResult getRoomHash(
@FormParam("user") BeanA user
, @FormParam("options") BeanB options
) throws ServiceException
{}
}
and I'm trying to invoke this method from JUnit test:
ExternalUserDTO user = new ExternalUserDTO();
RoomOptionsDTO options = new RoomOptionsDTO();
Map<String, List<Object>> map = new LinkedHashMap<>();
map.put("user", Arrays.asList((Object)user));
map.put("options", Arrays.asList((Object)options));
Response resp = getClient(USER_SERVICE_URL)
.path("/hash")
.form(map);
//throws no body wrapper for LinkedHashMap class
I cannot use .form(new Form().....) due to it can only accepts string
parameters
can someone please point me to an example or provide with the hint how this
can be implemented
Thanks in advance
--
WBR
Maxim aka solomax