AnsweredAssumed Answered

Trying to use content-service.wsdl

Question asked by slax on Oct 22, 2008
Latest reply on Oct 24, 2008 by vsuarez
Hello all,

I am trying to use content-service.wsdl to read and write content in Alfresco using the webservice API. I got all the authentication process and security understood, but now I keep getting the following error :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server.generalException</faultcode>
         <faultstring/>
         <detail>
            <ns1:ContentFault xmlns:ns1="http://www.alfresco.org/ws/service/content/1.0">
               <ns1:errorCode>0</ns1:errorCode>
               <ns1:message>Argument qname is mandatory</ns1:message>
            </ns1:ContentFault>
            <ns2:exceptionName xmlns:ns2="http://xml.apache.org/axis/">org.alfresco.repo.webservice.content.ContentFault</ns2:exceptionName>
            <ns3:stackTrace xmlns:ns3="http://xml.apache.org/axis/">at org.alfresco.repo.webservice.content.ContentWebService.read(ContentWebService.java:106)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
       […]
   </ns3:stackTrace>
            <ns4:hostname xmlns:ns4="http://xml.apache.org/axis/">PIERRE-INTALIO</ns4:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

This is when trying to use the "read" operation with the following message :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.alfresco.org/ws/service/content/1.0" xmlns:ns1="http://www.alfresco.org/ws/model/content/1.0">
   <soapenv:Header>
      <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ans1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <ans1:Created>2008-10-23T10:23:28-08:00</ans1:Created>
            <ans1:Expires>2008-12-30T22:25:28-08:00</ans1:Expires>
         </Timestamp>
         <UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 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">TICKET_63e6b6f00d3ee0a4e3f5f4282d9dd61d1a48c792</Password>
         </UsernameToken>
      </Security>
</soapenv:Header>
   <soapenv:Body>
      <ns:read>
         <ns:items>
            <ns1:nodes>
               <ns1:store>
                  <ns1:scheme>workspace</ns1:scheme>
                  <ns1:address>SpacesStore</ns1:address>
               </ns1:store>
               <ns1:uuid>92edbb56-b768-48d3-b786-2be4d7de281b</ns1:uuid>
            </ns1:nodes>
         </ns:items>
      </ns:read>
   </soapenv:Body>
</soapenv:Envelope>

Does anybody knows what I'm doing wrong ? What does "Argument qname is mandatory" mean ? Which argument is it talking about ? Many thanks in advance.

Outcomes