cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS .NET error

unknown-user
Champ on-the-rise
Champ on-the-rise
Can someone help?
I am trying to execute the following line of code in Visual Studio 2008 and I get an error.

  repositoryService = new RepositoryServicePortClient();
            repositoryService.ClientCredentials.UserName.UserName = "admin";
            repositoryService.ClientCredentials.UserName.Password = "admin";


The error states:

Channel = '((System.ServiceModel.ClientBase<Alfresco.RepositoryService.RepositoryServicePort>)(repositoryService)).Channel' threw an exception of type 'System.ServiceModel.CommunicationObjectFaultedException'

I tried two different methods of instantiation and it fails with the same error.

L also have this error genrated
InnerChannel = '((System.ServiceModel.ClientBase<Alfresco.RepositoryService.RepositoryServicePort>)(repositoryService)).InnerChannel' threw an exception of type 'System.ServiceModel.CommunicationObjectFaultedException'

base {System.Exception} = {"The communication object, System.ServiceModel.ChannelFactory`1[Alfresco.RepositoryService.RepositoryServicePort], cannot be used for communication because it is in the Faulted state."}

This is a simple instantiation.
I am not sure how this is occurring.
1 REPLY 1

unknown-user
Champ on-the-rise
Champ on-the-rise
Is there any activity in this forum?
I solved the first problem. There is a change in the Reference.cs proxy file that needs to be change.

New problem. I am getting a timestamp error but the format looks ok to me unless there is a different timestamp format for CMIS.


This is the error.

{"WSDoAllReceiver: security processing failed; nested exception is: \n\torg.apache.ws.security.WSSecurityException: An error was discovered processing the <wsseSmiley Frustratedecurity> header (WSSecurityEngine: Invalid timestamp {0}); nested exception is: \n\tjava.text.ParseException: Unparseable date: \"2009-05-11-T5:13:13.968Z\""}

Here is my xml file  below with the security header injected.
Can anyone tell me why I am getting the timestamp error?



<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" />
    <Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsu:Timestamp wsu:Id="Timestamp-614953125000" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsu:Created>2009-05-11-T5:04:55.203Z</wsu:Created>
        <wsu:Expires>2009-05-11-T11:04:59.593Z</wsu:Expires>
      </wsu:Timestamp>
      <UsernameToken wsu:Id="UsernameToken-615035937500" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <Username>admin</Username>
        <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</Password>
        <Nonce>IGRKG/ABNywDNZ1/lxxarA==</Nonce>
        <wsu:Created>2009-05-11-T5:05:03.187Z</wsu:Created>
      </UsernameToken>
</Security>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <getRepositories xmlns="http://www.cmis.org/2008/05" />
  </s:Body>
</s:Envelope>