You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Apache Wiki <wi...@apache.org> on 2005/04/01 09:13:20 UTC

[Ws Wiki] Update of "ja/axis/HttpRequest" by ToshiyukiKimura

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by ToshiyukiKimura:
http://wiki.apache.org/ws/ja/axis/HttpRequest

The comment on the change is:
Axis Wiki in Japanese

New page:
##language:ja

'''質問: 私のサービスを呼び出した{{{HttpServletRequest}}}にどのようにしてアクセスすればいいのでしょうか?'''

回答: {{{EchoHeaders.jws}}}に示されているように、メッセージコンテキストから{{{HttpServletRequest}}}を取得します。

{{{
    private HttpServletRequest getRequest() {
        MessageContext context = MessageContext.getCurrentContext();
        HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
        return req;
    }
}}}

メッセージが違うトランスポートから来た場合、リクエストは{{{null}}}になることに注意してください。[[BR]]
{{{webapp}}}全体を、{{{SOAP over HTTP}}}だけしかサポートしないようにハードコードすることはとても限定的な利用方法です。