Я могу получить доступ к объекту запроса HttpServlet в мыльной веб-службе следующим образом: Объявление частного поля для WebServiceContext в реализации службы и аннотирование его как ресурса:
@Resource
private WebServiceContext context;
Чтобы получить объект HttpServletRequet, я пишу код, как показано ниже:
MessageContext ctx = context.getMessageContext();
HttpServletRequest request =(HttpServletRequest)ctx.get(AbstractHTTPDestination.HTTP_REQUEST);
Но эти вещи не работают в спокойной веб-службе. Я использую Apache CXF для создания спокойного веб-сервиса. Скажите, как я могу получить доступ к объекту HttpServletRequest.