AnsweredAssumed Answered

Error while creating a folder using SOAPUI

Question asked by amitgoda on Mar 20, 2013
Hello Everyone,

I am new to Alfresco share and trying my hands on it.

I have downloaded the Alfresco Community 4.2 edition. I have created a site called "Demo-Content" and inside that site I created a folder called Test1.

Using the default Web service that comes along with Alfresco, I have created a SOAPUI project. Now I am trying to create a new folder "Test2" inside the Test1 folder.

Below is my SOAP request


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200908/">
   <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" ans1:Id=""
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>2013-03-20T22:30:00+05:30</ans1:Created>
            <ans1:Expires>2013-03-21T12:00:00+05:30</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_f3f5db890979fcf6a746a0f98af16170032972c8</Password>
         </UsernameToken>
      </Security>  
    </soapenv:Header>
   <soapenv:Body>
  <ns:update>
         <ns:statements>
<ns1:create xmlns:ns1="http://www.alfresco.org/ws/cml/1.0">
    <ns1:id>1</ns1:id>
    <ns1:parent>
        <ns2:store xmlns:ns2="http://www.alfresco.org/ws/model/content/1.0">
            <ns2:scheme>workspace</ns2:scheme>
            <ns2:address>SpacesStore</ns2:address>
        </ns2:store>
        <ns3:path xmlns:ns3="http://www.alfresco.org/ws/model/content/1.0">/app:company_home/st:sites/cm:Demo-content/cm:documentLibrary/cm:Test1</ns3:path>
        <ns4:associationType xmlns:ns4="http://www.alfresco.org/ws/model/content/1.0">{http://www.alfresco.org/model/content/1.0}contains</ns4:associationType>
        <ns5:childName xmlns:ns5="http://www.alfresco.org/ws/model/content/1.0">{http://www.alfresco.org/model/content/1.0}Test5</ns5:childName>
    </ns1:parent>
    <ns1:type>{http://www.alfresco.org/model/content/1.0}folder</ns1:type>
    <ns1:property>
        <ns6:name xmlns:ns6="http://www.alfresco.org/ws/model/content/1.0">{http://www.alfresco.org/model/content/1.0}name</ns6:name>
        <ns7:isMultiValue xmlns:ns7="http://www.alfresco.org/ws/model/content/1.0">false</ns7:isMultiValue>
        <ns8:value xmlns:ns8="http://www.alfresco.org/ws/model/content/1.0">Test5</ns8:value>
    </ns1:property>
    <ns1:property>
        <ns9:name xmlns:ns9="http://www.alfresco.org/ws/model/content/1.0">{http://www.alfresco.org/model/content/1.0}title</ns9:name>
        <ns10:isMultiValue xmlns:ns10="http://www.alfresco.org/ws/model/content/1.0">false</ns10:isMultiValue>
        <ns11:value xmlns:ns11="http://www.alfresco.org/ws/model/content/1.0">Test5-title</ns11:value>
    </ns1:property>
    <ns1:property>
        <ns12:name xmlns:ns12="http://www.alfresco.org/ws/model/content/1.0">{http://www.alfresco.org/model/content/1.0}description</ns12:name>
        <ns13:isMultiValue xmlns:ns13="http://www.alfresco.org/ws/model/content/1.0">false</ns13:isMultiValue>
        <ns14:value xmlns:ns14="http://www.alfresco.org/ws/model/content/1.0">Test5-description</ns14:value>
    </ns1:property>
</ns1:create>
</ns:statements>
      </ns:update>
   </soapenv:Body>
</soapenv:Envelope>



I am passing the correct Ticket token and when I fire the request I am 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:RepositoryFault xmlns:ns1="http://www.alfresco.org/ws/service/repository/1.0">
               <ns1:errorCode>0</ns1:errorCode>
               <ns1:message>java.lang.IllegalStateException: Failed to resolve to a single NodeRef with parameters (store=workspace:SpacesStore uuid=null path=/app:company_home/st:sites/cm:Demo-content/cm:documentLibrary/cm:Test1), found 0 nodes.</ns1:message>
            </ns1:RepositoryFault>
            <ns2:exceptionName xmlns:ns2="http://xml.apache.org/axis/">org.alfresco.repo.webservice.repository.RepositoryFault</ns2:exceptionName>
            <ns3:stackTrace xmlns:ns3="http://xml.apache.org/axis/">at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:335)
   at sun.reflect.GeneratedMethodAccessor749.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)</ns3:stackTrace>
            <ns4:hostname xmlns:ns4="http://xml.apache.org/axis/">AMiT-PC</ns4:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>


Can anyone please let me know what is wrong in the above code ???

I googled it out but couldnt find appropriate solution.

Thanks in advance !

Outcomes