tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/57-cascade-server-upgrade-broke-my-parent-folder-change-processCascade CMS: Discussion 2012-01-12T19:54:02Ztag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-07T20:57:22Z2011-04-07T20:57:22ZCascade Server upgrade broke my parent folder change process<div><p>Hi there,</p>
<p>The WSDL contains the following:<br></p>
<pre>
<code><element name="move">
<complexType>
<sequence>
<element maxOccurs="1" minOccurs="1" name="authentication"
nillable="false" type="impl:authentication" />
<!-- REQUIRED: identifier of the asset being moved -->
<element maxOccurs="1" minOccurs="1" name="identifier"
nillable="false" type="impl:identifier" />
<!-- REQUIRED: parameters specifying a new name and/or container for the asset -->
<element maxOccurs="1" minOccurs="1" name="moveParameters"
nillable="false" type="impl:moveParameters" />
<!-- NOT REQUIRED: workflow configuration to be used when moving -->
<element maxOccurs="1" minOccurs="0"
name="workflowConfiguration" nillable="false"
type="impl:workflow-configuration" />
</sequence>
</complexType>
</element></code>
</pre>
<p>This means that you will need to supply not only the standard
authentication and identifier, but you will also need to supply
<em>moveParameters</em> which are defined as the following:</p>
<pre>
<code><complexType name="moveParameters">
<sequence>
<!-- NOT REQUIRED: the container into which the asset will be moved
if left empty, asset will remain in its current container -->
<element maxOccurs="1" minOccurs="0"
name="destinationContainerIdentifier" type="impl:identifier" />
<element maxOccurs="1" minOccurs="1" name="doWorkflow"
nillable="false" type="xsd:boolean" />
<!-- NOT REQUIRED: name to give the asset
if left empty asset's name will not be changed -->
<element maxOccurs="1" minOccurs="0" name="newName"
type="xsd:string" />
</sequence>
</complexType></code>
</pre>
<p>As you can see from above, the <em>moveParameters</em> take:</p>
<ul>
<li>an identifier for destination folder, called
"destinationContainerIdentifier" (optional, not needed when
renaming)</li>
<li>the new name of the asset, called "newName" (also optional, not
needed when moving but when renaming)</li>
<li>a "doWorkflow" boolean flag (not required) that specifies
whether or not the asset should be put into workflow (false by
default)</li>
</ul>
<p>Let me know if this helps to clear things up.</p>
<p>Thanks<br></p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T00:08:45Z2011-04-08T00:08:48ZCascade Server upgrade broke my parent folder change process<div><p>Alright, so I think I get that "move" is an operation like
"read" or "edit" rather than a method like "setParentFolderId()",
right? So I've set up my structures for authentication, identifier
and moveParameters and I pass those as arguments when I invoke the
operation. I must be missing something though, because I get the
following error message...</p>
<pre>
<code>Application Error
Web service operation move with parameters {authentication={{USERNAME={XXXX},PASSWORD={YYYY}}},moveParameters={{DOWORKFLOW={false},ID={b21f9b770a5a5a8f01a142ec727dd2a2},TYPE={folder}}},identifier={{ID={0245100f0a5a5a8f003a4ca5de1f3442},TYPE={page}}}} cannot be found.'</code>
</pre>
<p>Can you see what I'm doing wrong?</p></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T00:58:42Z2011-04-08T00:58:43ZCascade Server upgrade broke my parent folder change process<div><p>I noticed in the error message I sent you, I had the
doWorkflow=false element as part of the
destinationContainerIdentifier structure rather than as a separate
element. I also had the moveParameters structure being passed
before the identifier structure. I've corrected both problems, but
I'm still getting the same "cannot be found" error...</p>
<pre>
<code>Application Error
Web service operation move with parameters {{AUTHENTICATION={{USERNAME={XXXX},PASSWORD={YYYY}}},IDENTIFIER={{ID={0245100f0a5a5a8f003a4ca5de1f3442},TYPE={page}}},MOVEPARAMETERS={{DESTINATIONCONTAINERIDENTIFIER={{ID={b21f9b770a5a5a8f01a142ec727dd2a2},TYPE={folder}}},DOWORKFLOW={false}}}}} cannot be found.</code>
</pre></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T14:43:51Z2011-04-08T14:43:52ZCascade Server upgrade broke my parent folder change process<div><p>I just updated to 6.7.6 just to make sure there wasnt an update
that effected this. Still having the same issues.</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T17:43:33Z2011-04-08T17:43:33ZCascade Server upgrade broke my parent folder change process<div><p>I just tested this using PHP and it worked as expected. Here is
a code snippet:<br></p>
<pre>
<code>$destinationContainerIdentifier = array(
'path' => array(
'path' => '/news',
'siteName' => 'example.com'
),
'type' => 'folder'
);
$moveParameters = array(
'destinationContainerIdentifier' => $destinationContainerIdentifier,
'doWorkflow' => false);
$all_params = array(
'authentication' => array(
'username' => $username,
'password' => $password),
'identifier' => array(
'path' => array(
'path' => '/about',
'siteName' => 'example.com'
),
'type' => 'page'),
'moveParameters' => $moveParameters);
$cascade->move($all_params);</code>
</pre>
<p>Let me know if this helps to give you an idea of where things
are going wrong in your script.</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T18:25:34Z2011-04-08T18:25:35ZCascade Server upgrade broke my parent folder change process<div><p>Thanks tim. That works. Now we just need to figure out why CF
isnt working. Strange.</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-08T19:08:14Z2011-04-08T19:08:15ZCascade Server upgrade broke my parent folder change process<div><p>Hey Tim, are these arguments and such case sensitive? I've been
looking at the argument arrays from both CF and PHP and the only
difference seems to be that CF want to capitalize
everything.<br></p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-09T18:49:09Z2011-04-09T18:49:09ZCascade Server upgrade broke my parent folder change process<div><p>Tim R.,</p>
<p>Is there a way to do this with IDs instead of path/siteNames
arrays? We don't use sites on our Cascade Server.</p></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-09T21:49:40Z2011-04-09T21:49:40ZCascade Server upgrade broke my parent folder change process<div><p>Tim R.,</p>
<p>Tim H tells me I can use 'global' as the site, so I've done
that. Still no luck.</p>
<p>I've solved Tim H's problem with the all caps, but it still does
not seem to help. I still get the same error. One thing I noticed
was that ColdFusion is creating "structures" while PHP is creating
"arrays". Could this be one of the sources of our trouble?</p>
<p>When I try to convert the same content to ColdFusion arrays, I
lose the identifiers for each field. ie "path | '/about'" becomes
"[1] '/about'". And of course I get the same error message.</p>
<p>Any thoughts?</p></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-09T22:05:51Z2011-04-09T22:05:51ZCascade Server upgrade broke my parent folder change process<div><p>If this helps, I am attaching screen caps of the argument dumps
from both ColdFusion and PHP. Any idea at all why the PHP arguments
work and the CF arguments don't?</p></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-11T16:10:22Z2011-04-11T16:10:22ZCascade Server upgrade broke my parent folder change process<div><p>Rather than specifying 'global' for the <em>siteName</em>, try
setting the value to <em>NULL</em>. As of now, I believe your code
is relying on <a href=
"http://issues.hannonhill.com/browse/CSI-73">this bug</a>. This is
not necessarily the cause of the problem, but it is something you
will want to change so that it won't break once a fix is put into
place in a future release.</p>
<p>Can you attach your XML SOAP request from the CF
attempt?<br></p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-12T00:39:55Z2011-04-12T00:39:55ZCascade Server upgrade broke my parent folder change process<div><p>Well, I changed the sitename value to NULL and still got the
same error. Here's the CF code I'm using...</p>
<pre>
<code><cftry>
<cfscript>
destFolderPath = structNew();
StructInsert(destFolderPath, "path", "/AGNR Web Site/news/archive");
StructInsert(destFolderPath, "siteName", "NULL");
</cfscript>
<cfscript>
destFolder = structNew();
StructInsert(destFolder, "path", destFolderPath);
StructInsert(destFolder, "type", "folder");
</cfscript>
<cfscript>
authentication = structNew();
StructInsert(authentication, "username", "XXXX");
StructInsert(authentication, "password", "YYYY");
</cfscript>
<cfscript>
thisArticlePath = structNew();
StructInsert(thisArticlePath, "path", "/AGNR Web Site/news/articles/News Page160");
StructInsert(thisArticlePath, "siteName", "NULL");
</cfscript>
<cfscript>
thisArticle = structNew();
StructInsert(thisArticle, "path", thisArticlePath);
StructInsert(thisArticle, "type", "page");
</cfscript>
<cfscript>
moveParameters = structNew();
StructInsert(moveParameters, "destinationContainerIdentifier", destFolder);
StructInsert(moveParameters, "doWorkflow",JavaCast("boolean", "false"));
</cfscript>
<cfscript>
argColl = structNew();
StructInsert(argColl, "authentication", authentication);
StructInsert(argColl, "identifier", thisArticle);
StructInsert(argColl, "moveParameters", moveParameters);
</cfscript>
<cfscript>
ws = createObject("webservice", "http://cascade:8080/ws/services/AssetOperationService?wsdl");
ws.move(argColl);
</cfscript>
<!---
<cfinvoke
webservice = "http://cascade:8080/ws/services/AssetOperationService?wsdl"
method = "move"
body = #argColl#
returnvariable="busList">
</cfinvoke>
--->
<cfcatch type="any">
<cfoutput>
<p>#CFCATCH.TYPE# Error <br/>#cfcatch.message#<br/>#cfcatch.detail#</p>
</cfoutput>
</cfcatch>
</cftry>
<cfoutput>
<P>test!</P>
<cfdump var="#argColl#">
</cfoutput></code>
</pre></div>mshutetag:help-archives.hannonhill.com,2010-02-09:Comment/64963122011-04-13T20:50:16Z2011-04-13T20:50:16ZCascade Server upgrade broke my parent folder change process<div><p>We need the XML from the actual SOAP request. <a href=
"http://www.adobe.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001556.htm">
This link</a> should explain how to get that using Cold Fusion.</p>
<p>Once you have that set up, you'll want to grab the XML from the
request and attach it here for us to review.</p>
<p>Thanks</p></div>Tim