cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS & SOAP : authentification?

grummfy
Champ in-the-making
Champ in-the-making
Hello,

I would like to use the SOAP protocol with CMIS but I meet a problem with the authentification. With REST acess I can use HTTP Basic (and other auth method like ticket) without any problems.

From the CMIS specification it should be possible to use HTTP BASIC auth and possibly other method that were repository specific (lioke ticket for alfresco. But with SOAP I didn't find the way to get this working.


For information, here is my test (PHP code on CMIS demo server of Alfresco (cmis.alfresco.com)) :

<?php

    try
    {
       $client = new SoapClient('http://cmis.alfresco.com/cmis/RepositoryService?wsdl', array('user'=>'admin', 'password'=>'admin'));
       $client->getRepositoryInfo('84ccfe80-b325-4d79-ab4d-080a4bdd045b');

       echo 'Request :<pre>'.htmlspecialchars($client->__getLastRequest());
       echo '</pre>Response:<pre>'.htmlspecialchars($client->__getLastResponse()) . '</pre>';
    }
    catch (SoapFault $e)
    {
       echo '<p>Fault String: ' . $e->faultstring . '<p>';
       echo '<p>Fault Code: ' . $e->faultcode . '<p>';
    }


And the error :
Fault String: An error was discovered processing the header

Fault Code: ns1:InvalidSecurity


thanks for your helping
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
You have to add the UsernameToken element in your SOAP headers, as defined in the WS-Security standard promoted by the WS-I and then required for the CMIS standard.
Hope this helps.