cancel
Showing results for 
Search instead for 
Did you mean: 

Create a new space or folder via web services

mwaldrop
Champ in-the-making
Champ in-the-making
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>
      <wsseSmiley Frustratedecurity 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>
            <wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_fa4378d50a9ca7f610618cb928d3a27e1443deb5</wsseSmiley Tongueassword>
            <wsse:Nonce>JrKZdUBVLTODE7Hayc+35A==</wsse:Nonce>
            <wsu:Created>2008-01-14T18:40:34.078Z</wsu:Created>
         </wsse:UsernameToken>
      </wsseSmiley Frustratedecurity>
   </soapenv:Header>
   <soapenv:Body>
      <ns:update>
         <ns:statements>
            <!–Zero or more repetitions:–>
            <ns1:create>
               <!–Optional:–>
               <ns1Smiley Tonguearent>
                  <!–Optional:–>
                  <ns2:store>
                     <!–Optional:–>
                     <ns2:scheme>workspace</ns2:scheme>
                     <!–Optional:–>
                     <ns2:address>SpacesStore</ns2:address>
                  </ns2:store>
                  <!–Optional:–>
                  <ns2:uuid/>
                  <!–Optional:–>
                  <ns2Smiley Tongueath>/app:company_home/cm:teamworks</ns2Smiley Tongueath>
                  <!–Optional:–>
                  <ns2:associationType/>
                  <!–Optional:–>
                  <ns2:childName/>
               </ns1Smiley Tonguearent>
               <!–Optional:–>
               <ns2:childName>test2</ns2:childName>
               <!–Optional:–>
               <ns1:type>folder</ns1:type>
            </ns1:create>
         </ns:statements>
      </ns:update>
   </soapenv:Body>
</soapenv:Envelope>

Any thoughts ?
2 REPLIES 2

pmonks
Star Contributor
Star Contributor
To help troubleshoot this issue, I'd suggest running the Web Services client example code (the "SDK WebServiceSamples" Eclipse project available in the Alfresco SVN repository) and configure an HTTP proxy (such as TCPMon - https://tcpmon.dev.java.net/) to sit between the client and the server.  This will allow you to capture some functioning SOAP messages which can be compared against the hand-crafted messages.

tejashpatel
Champ in-the-making
Champ in-the-making
hi,

  Try to download Alfresco webservice-client  and Run it's Test Class   for nodeservice and contentservice you will get sample to create space using
webservice.

Smiley Happy
Regards,
Tejash Patel
Cignex Technology,
India