You have to turn NTLM off on the server. As long as the server requests
NTLM authentication, the JRE will provide the credentials of the local user.


Florian


On 08/09/2011 16:08, Naresh Bhatia wrote:
> Is there any way to avoid NTLM authentication. I am using these parameters
> when creating the session:
> 
> org.apache.chemistry.opencmis.user=xyz
> org.apache.chemistry.opencmis.password=xyz
> org.apache.chemistry.opencmis.binding.spi.type=atompub
> org.apache.chemistry.opencmis.binding.atompub.url=
> http://spserver/_vti_bin/cmis/rest/60dae9c3-b9b0-4cc7-90e4-3af5b6ff25f6?getrepositoryinfo
> org.apache.chemistry.opencmis.session.repository.id
> =60dae9c3-b9b0-4cc7-90e4-3af5b6ff25f6
> 
> Thanks.
> Naresh
> 
> 
> On Thu, Sep 8, 2011 at 5:04 AM, Florian Müller <[email protected]
>> wrote:
> 
>> Naresh,
>>
>> OpenCMIS relies on the NTLM support provided by the JRE [1].
>>
>> It's documentation says:
>> "On Microsoft Windows platforms, NTLM authentication attempts to acquire
>> the user credentials from the system without prompting the user's
>> authenticator object. If these credentials are not accepted by the server
>> then the user's authenticator will be called."
>>
>> If you can, avoid using NTLM. It causes all kinds of problems.
>>
>>
>> - Florian
>>
>>
>> [1]
>> http://download.oracle.com/javase/6/docs/technotes/guides/net/http-auth.html
>>
>>
>> On 08/09/2011 01:50, Naresh Bhatia wrote:
>>> Jérôme,
>>>
>>> I made quite a bit of progress based on your suggestions. I have figured
>> out
>>> what my Library Id is. I can access the library using the CMIS Workbench
>> and
>>> my own standalone OpenCMIS app. The last hurdle is that I cannot get it
>> to
>>> work through my web application - it is giving me
>>> a CmisUnauthorizedException:
>>>
>>>
>> org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException:
>>> Unauthorized
>>> at
>>>
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:552)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:716)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfo(RepositoryServiceImpl.java:62)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfo(RepositoryServiceImpl.java:69)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.runtime.SessionImpl.connect(SessionImpl.java:610)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession(SessionFactoryImpl.java:92)
>>> at
>>>
>> org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession(SessionFactoryImpl.java:64)
>>> at
>>>
>> com.wellmanage.wellington2go.domain.cmis.CmisSession.<init>(CmisSession.java:69)
>>>
>>> The parameters I am passing to SessionFactory.createSession() are exactly
>>> the same as what I pass to my standalone app, so I can't understand why I
>>> get the CmisUnauthorizedException.
>>>
>>> Another interesting thing is that my standalone program (and CMIS
>> Workbench)
>>> can access SharePoint even if I don't pass a username and password.
>> That's
>>> really puzzling.
>>>
>>> Anything you can make out of this?
>>>
>>> Thanks.
>>> Naresh
>>>
>>>
>>>
>>> On Fri, Sep 2, 2011 at 3:44 PM, Jérome Simard <[email protected]>
>> wrote:
>>>
>>>> Naresh,
>>>>
>>>> Sorry I meant Library id.
>>>>
>>>> Your best bet would be to use the CMIS Workbench to connect to
>> SharePoint
>>>> using the webservice binding, once connected you will see the Library ID
>> of
>>>> all the available SharePoint libraries. It should have this form
>>>> 2625c04a-8ec6-4e30-bcca-d7895e87c89f.
>>>>
>>>> Good luck,
>>>> Jérôme
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Naresh Bhatia [mailto:[email protected]]
>>>> Sent: 2 septembre 2011 15:36
>>>> To: [email protected]
>>>> Subject: Re: Pointers on connecting to Sharepoint 2010 using OpenCMIS
>>>>
>>>> Thanks so much Jérôme. I will give it a shot.
>>>>
>>>> What is a Site ID btw?
>>>>
>>>> Naresh
>>>>
>>>>
>>>> On Fri, Sep 2, 2011 at 3:23 PM, Jérome Simard <[email protected]>
>> wrote:
>>>>
>>>>> Hi Naresh,
>>>>>
>>>>> You must use the same URL for each services, i.e
>>>>> http://spserver/_vti_bin/CMISSoapwsdl.aspx
>>>>>
>>>>> To use the AtomPub binding, your URL should include the Site ID, like
>>>> this:
>>>>>
>>>>>
>>>>
>> http://spserver/_vti_bin/cmis/rest/2625c04a-8ec6-4e30-bcca-d7895e87c89f?getrepositoryinfo
>>>>>
>>>>> Cheers,
>>>>> Jérôme
>>>>>
>>>>>
>>>>> Jérôme Simard
>>>>> Principal Software Architect  |  T 418-525-0606 #2264  |  F
>> 418-525-0909
>>>>> 400, boul. Jean-Lesage, Suite 38  |  Québec, QC, Canada, G1K 8W1  |
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Naresh Bhatia [mailto:[email protected]]
>>>>> Sent: 2 septembre 2011 15:09
>>>>> To: dev
>>>>> Subject: Pointers on connecting to Sharepoint 2010 using OpenCMIS
>>>>>
>>>>> I am trying to connect to Sharepoint 2010 using OpenCMIS. I was given a
>>>> URL
>>>>> for the WSDL by my sysadmin (something like
>>>>> http://spserver/_vti_bin/CMISSoapwsdl.aspx). Unfortunately, it looks
>>>> like
>>>>> the URL have a combined WSDL for all CMIS services. Looking at this
>>>>> OpenCMIS
>>>>> example<
>>>>> http://chemistry.apache.org/java/examples/example-create-session.html
>>> ,
>>>>> it appears that I need one URL per service.
>>>>>
>>>>>
>>>>>    1. How do I go about connecting to Sharepoint using this combined
>>>> WSDL?
>>>>>    Does Sharepoint also publish separate WSDLs as shown in the example.
>>>>>    2. Does sharepoint support AtomPub?
>>>>>
>>>>>
>>>>> Thanks.
>>>>> Naresh
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
> 

Reply via email to