ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattias Jiderhamn" <matt...@expertsystem.se>
Subject RE: Accessing HTTP Request object(/headers) within Webservice implemention class.
Date Mon, 02 Sep 2002 09:47:41 GMT
Is there an easy way to create a WSDL file without the context parameter?
(Without having to edit it manually)

> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> Sent: Thursday, August 29, 2002 9:29 PM
> To: soap-dev@xml.apache.org; soap-user@xml.apache.org
> Subject: Re: Accessing HTTP Request object(/headers) within Webservice
> implemention class.
>
>
> This method that has existed for a release or two of the code.  You change
> your service methods so that any method that needs access to this
> information has an initial parameter of type SOAPContext.  For example, if
> your method was
>
>     public String echo(String s)
>
> it is now
>
>     public String echo(SOAPContext ctx, String s)
>
> The SOAP client still behaves as if the method had the original signature,
> i.e. it passes a single parameter of type String.  The Apache SOAP server
> software will not find a method with such a signature, so it will look for
> one with the second signature above.
>
> So, now you have a SOAPContext.  You get things of interest from its
> property bag as follows
>
>           req = reqCtx.setProperty(Constants.BAG_HTTPSERVLETREQUEST);
>           res = reqCtx.setProperty(Constants.BAG_HTTPSERVLETRESPONSE);
>
> You can see in Constants.java that the following information is available
>
>   public static String BAG_HTTPSERVLET = "HttpServlet" ;
>   public static String BAG_HTTPSESSION = "HttpSession" ;
>   public static String BAG_HTTPSERVLETREQUEST = "HttpServletRequest" ;
>   public static String BAG_HTTPSERVLETRESPONSE = "HttpServletResponse" ;
>   public static String BAG_DEPLOYMENTDESCRIPTOR = "DeploymentDescriptor" ;
>
> where I believe the names tell it all.
>
> Scott Nichol
> ----- Original Message -----
> From: "Sinha, Madhukar [IT]" <madhukar.sinha@citigroup.com>
> To: <soap-dev@xml.apache.org>; <soap-user@xml.apache.org>
> Sent: Thursday, August 29, 2002 12:57 PM
> Subject: Accessing HTTP Request object(/headers) within Webservice
> implemention class.
>
>
>
>
> Hi
>
>  This may be a very trivial question, but i will appriciate if
> someone could
> give pointers or answers.
>
> what is the best way to access HTTP request object from webservice
> implementation class. I need to access the HTTP header info , like Cookie
> and REMOTE_USER?
>
> Please let me know.
>
> thanks
>
> -
>
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>
>
>


Mime
View raw message