George,

OpenCMIS relies on the cookie handling that is provided by Java. There is no 
specific OpenCMIS code that deals with cookies.
HttpURLConnections should get hold of the CookieManager from the CookieHandler 
and then use it.

There are some disadvantages to this approach. For example, all sessions share 
the same set of cookies and the CookieManager is shared across all connections 
in the JVM.
A smarter, session based cookie handling is on the list for 0.5.0 (and I have a 
good chunk of the code already done).

The best place for debugging is probably 
org.apache.chemistry.opencmis.client.bindings.spi.atompub.HttpUtils in the 
chemistry-opencmis-client-bindings package.
The invoke() method handles the HTTP connections for the AtomPub binding.


- Florian


On 08/07/2011 14:51, Florentine, George wrote:
> Florian, the HTTP Set-Cookie message coming back from SP looks like this:
> 
> Set-Cookie: 
> WSS_KeepSessionAuthenticated={e5a6caaf-581c-4c26-aa12-0489087b7ec1}; path=/
> 
> Looks ok to me... Can you point me at the place in OpenCMIS where cookies are 
> set? I can look at that code in the debugger and see what's going on.  Maybe 
> I've got some setup in my environment that is preventing the CookieManager 
> class and the OpenCMIS code from playing nice with each other...
> 
> thx,
> 
> g
> ---
> 
> 
> George Florentine
>   
> VP, Engineering
>   
> +1 (303) 542-2173  |  Office
> +1 (303) 669-8628  |  Cell
> +1 (303) 544-0522  |  Fax
>   
> [email protected]
>   
> http://www.flatironssolutions.com
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Florian Müller [mailto:[email protected]]
> Sent: Friday, July 08, 2011 2:47 AM
> To: Florentine, George
> Cc: [email protected]
> Subject: Re: cookie support in 0.4.0
> 
> Hi George,
> 
> I haven't tested SharePoint but it works fine with other repositories.
> The path might be the cause the problem. What is the value of the path
> attribute?
> 
> - Florian
> 
> 
> 
> On 06/07/2011 18:55, Florentine, George wrote:
>> I'm building an application that uses the OpenCMIS client to talk to
>> SharePoint 2010. I'd like to turn on cookie support so I inserted code
>> to create a CookieManager as described in
>> http://chemistry.apache.org/java/how-to/how-to-connect.html. When I use
>> Wireshark to look at traffic between my app and SharePoint I see SP
>> setting what looks like a reasonable cookie (it does have a path
>> attribute set) but in subsequent calls, the OpenCMIS code does not send
>> the cookie back.
>>
>> I see a post (https://issues.apache.org/jira/browse/CMIS-366) that
>> indicates that this works in 0.4.0 but it doesn't seem to be working for
>> me.
>>
>> Any insights?
>>
>> thx,
>>
>> g
>>
>> ---
>>
>> email_Graphic_noTag
>>
>>      
>>
>> *George Florentine***
>>
>>      
>>
>> /VP, Engineering///
>>
>>      
>>
>> *+1 (303) 542-2173 | Office***
>>
>> *+1 (303) 669-8628 | Cell ***
>>
>> *+1 (303) 544-0522 | Fax***
>>
>>      
>>
>> [email protected]
>> <mailto:[email protected]>
>>
>>      
>>
>> http://www.flatironssolutions.com<http://www.flatironssolutions.com/>
>>
>>      
>>
>>                      
>>
> 

Reply via email to