AnsweredAssumed Answered

Create a new space or folder via web services

Question asked by mwaldrop on Jan 14, 2008
Latest reply on Jan 17, 2008 by tejashpatel
I'm trying to create a new folder  using a SOAP based interaction.   I'm assuming the right approach is to use the CREATE statement from the RepositoryService wsdl.  I've tried a few different combinations of arguments to this method and keep getting a:

"org.alfresco.service.namespace.InvalidQNameException: Argument qname is mandatory"

error when I try to construct the SOAP message directly from soapUI.  I'm not sure which argument is not being specified.  This is the SOAP message I'm constructing:

<soapenv:Envelope xmlns:ns="http://www.alfresco.org/ws/service/repository/1.0" xmlns:ns1="http://www.alfresco.org/ws/cml/1.0" xmlns:ns2="http://www.alfresco.org/ws/model/content/1.0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsu:Timestamp wsu:Id="Timestamp-4930683" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2008-01-14T19:03:32.203Z</wsu:Created>
            <wsu:Expires>2009-01-14T19:13:32.203Z</wsu:Expires>
         </wsu:Timestamp>
         <wsse:UsernameToken wsu:Id="UsernameToken-15912964" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>ticket</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_fa4378d50a9ca7f610618cb928d3a27e1443deb5</wsse:Password>
            <wsse:Nonce>JrKZdUBVLTODE7Hayc+35A==</wsse:Nonce>
            <wsu:Created>2008-01-14T18:40:34.078Z</wsu:Created>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns:update>
         <ns:statements>
            <!–Zero or more repetitions:–>
            <ns1:create>
               <!–Optional:–>
               <ns1:parent>
                  <!–Optional:–>
                  <ns2:store>
                     <!–Optional:–>
                     <ns2:scheme>workspace</ns2:scheme>
                     <!–Optional:–>
                     <ns2:address>SpacesStore</ns2:address>
                  </ns2:store>
                  <!–Optional:–>
                  <ns2:uuid/>
                  <!–Optional:–>
                  <ns2:path>/app:company_home/cm:teamworks</ns2:path>
                  <!–Optional:–>
                  <ns2:associationType/>
                  <!–Optional:–>
                  <ns2:childName/>
               </ns1:parent>
               <!–Optional:–>
               <ns2:childName>test2</ns2:childName>
               <!–Optional:–>
               <ns1:type>folder</ns1:type>
            </ns1:create>
         </ns:statements>
      </ns:update>
   </soapenv:Body>
</soapenv:Envelope>

Any thoughts ?

Outcomes