AnsweredAssumed Answered

Error 'Invalid User' for WSs.

Question asked by revathy on Oct 27, 2010
Hi,

For the WSs other than Authentication WSs "startSession" and "endSession", we are getting the Time-out error from SOAP UI.
Also We have tried the same in Cordys(a BPM suite), we are getting "Invalid User" error. We can test the WSs there. Even The basic Alfresco WSs are failing.
By default, the Alfresco WS requests dont have header. Then we were getting "Unsupported KeyInfo" error. So, we added the header info having the Timestamp and UsernameTokens.

REQUEST:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Header>
    <QueryConfiguration xmlns="http://www.alfresco.org/ws/service/repository/1.0">
      <fetchSize xmlns="http://www.alfresco.org/ws/headers/1.0">500</fetchSize>
    </QueryConfiguration>
    <wsse:Security
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            SOAP:mustUnderstand="0">
          <wsse:UsernameToken>
                <wsse:Username>ticket</wsse:Username>
                <wsse:Password>TICKET_b5ac89ccf695c53cff139359cf9e86db355fad26</wsse:Password>
            </wsse:UsernameToken>
          <wsu:Timestamp wsu:Id="Timestamp-10" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2010-10-27T16:22:23Z </wsu:Created>
            <wsu:Expires>2010-10-29T23:19:23Z </wsu:Expires>
         </wsu:Timestamp>
        </wsse:Security>
  </SOAP:Header>
  <SOAP:Body>
    <query xmlns="http://www.alfresco.org/ws/service/repository/1.0">
      <store>
        <scheme xmlns="http://www.alfresco.org/ws/model/content/1.0">workspace </scheme>
        <address xmlns="http://www.alfresco.org/ws/model/content/1.0">SpacesStore </address>
      </store>
      <query>
        <language xmlns="http://www.alfresco.org/ws/model/content/1.0">lucene</language>
        <statement xmlns="http://www.alfresco.org/ws/model/content/1.0">PATH:"app:company_home/cm:Drupal”</statement>
      </query>
      <includeMetaData>false</includeMetaData>
    </query>
  </SOAP:Body>
</SOAP:Envelope>

RESPONSE:

<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <faultcode xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">ns0:Client</faultcode>
  <faultstring xml:lang="en-US">Not a valid user.</faultstring>
  <detail>
    <cordys:FaultDetails xmlns:cordys="http://schemas.cordys.com/General/1.0/">
      <cordys:LocalizableMessage xmlns:cordys="http://schemas.cordys.com/General/1.0/">
        <cordys:MessageCode xmlns:cordys="http://schemas.cordys.com/General/1.0/">Cordys.ESBServer.Messages.invalidUser</cordys:MessageCode>
      </cordys:LocalizableMessage>
    </cordys:FaultDetails>
    <cordys:FaultRelatedException xmlns:cordys="http://schemas.cordys.com/General/1.0/">
      <![CDATA[com.eibus.security.identity.InvalidIdentityException: Failed to determine identity: Could not determine identity, found multiple identities in the SOAP message
   at com.eibus.security.identity.UserIdentityFactory.determineIdentity(UserIdentityFactory.java:80)
   at com.eibus.soap.Processor._determineIdentity(Processor.java:1608)
   at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:312)
   at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:175)
   at com.eibus.soap.Processor.onReceive(Processor.java:956)
   at com.eibus.soap.Processor.onReceive(Processor.java:929)
   at com.eibus.connector.nom.Connector.onReceive(Connector.java:417)
   at com.eibus.transport.Middleware$NonTransactionalWorkerThreadBody.run(Middleware.java:1722)
   at com.eibus.util.threadpool.WorkerThread.run(WorkerThread.java:64)
Caused by: com.eibus.security.identity.IdentityCreationException: Could not determine identity, found multiple identities in the SOAP message
   at com.eibus.security.identity.UserIdentityFactory.determineIdentity(UserIdentityFactory.java:66)
   … 8 more
]]>
    </cordys:FaultRelatedException>
  </detail>
</SOAP:Fault>

Is there anything wrong with the request? Not able to use the Alfresco WSs.
Pls share your idea.. we stuck here..

Outcomes