Source:Getting debug session timeout trying to debug Android junit tests
@PayloadRoot(namespace = "http://www.myservice/v1.0/query", localPart = "queryRequest")
@ResponsePayload
public JAXBElement<QueryResponse> queryAddrLocation(@RequestPayload JAXBElement<QueryRequest> queryRequest) {
System.out.println("Welcome to " + queryRequest);
return createJaxbElement(new QueryResponse(), QueryResponse.class);
}
private <T> JAXBElement<T> createJaxbElement(T object, Class<T> clazz) {
return new JAXBElement<>(new QName(clazz.getSimpleName()), clazz, object);
}