That's actually very useful since I use the standalone mode for quick
testing,
however, the target deployment is for Tomcat-5.5 and I can see a
"Set-Cookie"
in an HTTP trace.

Thanks Willem,

   -Chris



-----Original Message-----
From: Willem Jiang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 11, 2008 12:36 AM
To: [email protected]
Subject: Re: CXF Client not maintaing cookies

Hi,
Does your CXF server use Jetty as a stand alone HTTP Server?
If So you need some server side configuration.
Please enable the Jetty's support session feature, since the default
value is disabled.
Here is an example

<beans xmlns="http://www.springframework.org/schema/beans";
  xmlns:beans="http://www.springframework.org/schema/beans";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:sec="http://cxf.apache.org/configuration/security";
  xmlns:http="http://cxf.apache.org/transports/http/configuration";
 
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration";
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";
  xsi:schemaLocation="http://cxf.apache.org/configuration/security
 
http://cxf.apache.org/schemas/configuration/security.xsd
            http://cxf.apache.org/transports/http/configuration
            http://cxf.apache.org/schemas/configuration/http-conf.xsd
            http://cxf.apache.org/transports/http-jetty/configuration
            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
  ...

  <httpj:engine-factory bus="cxf">    
    <httpj:engine port="9001">
      <httpj:sessionSupport>true</hj:sessionSupport>
    </httpj:engine>
  </httpj:engine-factory>
 </beans>


You need to specify the Jetty engine's port number according to your
server's address, in the example the configuration just work for the
publishing the service to port 9001.

You can find more information about how to configure the Jetty server in
CXF here:

http://cwiki.apache.org/CXF20DOC/jetty-configuration.html


Willem

Wolf, Chris (IT) wrote:
> I am trying to set an HTTP cookie from the CXF server.  It works with 
> a browser, but the generated CXF client does not keep or send back 
> cookies.  I tried the code:
>  
> SecAdmin_Service ss = new SecAdmin_Service(wsdlURL, SERVICE_NAME); 
> SecAdmin port = ss.getSecadmin(); BindingProvider provider = 
> (BindingProvider)port; 
> provider.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROP
> ER
> TY, true);
>
> ...as mentioned here:
> http://www.nabble.com/JSESSIONID-cookie-not-sent-back-to-server-td1551
> 40
> 55.html
>
> but it does not seem to be working.  I am using CXF-2.0.4.
>
> Thanks,
>
>    -Chris
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
>
>
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

Reply via email to