tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/11-handling-multiple-groups-when-using-wsdl-and-php
Cascade CMS: Discussion
2018-10-18T20:36:01Z
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-17T20:36:59Z
2010-08-17T20:36:59Z
Handling multiple groups when using WSDL and PHP
<div><p>Hi,</p>
<p>Check out my comment on <a href="http://help.hannonhill.com/discussions/how-do-i/24-add-multiple-values-for-dynamic-fields-using-wsdl">this post</a> and let me know if that helps to resolve your issue.</p>
<p>Thanks</p></div>
Tim
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-18T14:58:40Z
2010-08-18T15:01:05Z
Handling multiple groups when using WSDL and PHP
<div><p>I tried applying the principle of <a href="http://help.hannonhill.com/discussions/how-do-i/24-add-multiple-values-for-dynamic-fields-using-wsdl">that post</a> to structured data by encapsulating structuredDataNode items in their own array and the result was: <code>SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'type' property</code>.</p>
<p>An example of the encapsulation is at <a href="http://pastebin.com/pVuRMTNz">http://pastebin.com/pVuRMTNz</a></p></div>
Bryan Zera
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-18T19:11:08Z
2010-08-18T19:11:08Z
Handling multiple groups when using WSDL and PHP
<div><p>Are you able to attach your entire script here?</p></div>
Tim
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-18T20:49:15Z
2010-08-18T20:49:15Z
Handling multiple groups when using WSDL and PHP
<div><p>Sure. Thanks for your help.</p></div>
Bryan Zera
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-25T15:02:34Z
2010-08-25T15:02:34Z
Handling multiple groups when using WSDL and PHP
<div><p>Any thoughts on the script?</p>
<p>I had a thought that if, instead of creating the request as a PHP array, we create it as XML. Then, there's no language construct that keeps us from including more than one structuredDataNode underneath the structuredData element. I'll work on that front.</p>
<p>Let me know if you find something. Thanks.</p></div>
Bryan Zera
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-25T19:16:02Z
2010-08-25T19:16:43Z
Handling multiple groups when using WSDL and PHP
<div><p>For the record, this is what the PHP array looks like before I send it to the SOAPClient. Each element that can have duplicates is encapsulated in it's own numerically indexed array. This creates the asset correctly, but does not insert any of the content in the array-encapsulated nodes into the appropriate DDF fields.</p>
<pre><code>Array
(
[authentication] => Array
(
[username] => bzera
[password] => xxx
)
[asset] => Array
(
[page] => Array
(
[name] => Two_Column_-_No_Title
[parentFolderPath] => /
[contentTypePath] => 2 Column - No Title
[metadataSetPath] => site://Main Site/Standard Page
[siteName] => SANDBOX
[metadata] => Array
(
[title] => Two Column - No Title
[keywords] => Two Column - No Title Keywords
[description] => Two Column - No Title Description
)
[structuredData] => Array
(
[0] => Array
(
[structuredDataNode] => Array
(
[type] => group
[identifier] => content
[structuredDataNodes] => Array
(
[0] => Array
(
[structuredDataNode] => Array
(
[type] => text
[identifier] => main-content
[text] => MAIN CONTENT
)
)
[1] => Array
(
[structuredDataNode] => Array
(
[type] => text
[identifier] => column-intruder
[text] => COLUMN INTRUDER
)
)
)
)
)
[1] => Array
(
[structuredDataNode] => Array
(
[type] => group
[identifier] => page-properties
[structuredDataNodes] => Array
(
[0] => Array
(
[structuredDataNode] => Array
(
[type] => text
[identifier] => random-intruder-bank
[text] => Dance Center
)
)
)
)
)
)
)
)
)</code></pre></div>
Bryan Zera
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-30T18:15:17Z
2010-08-30T18:15:17Z
Handling multiple groups when using WSDL and PHP
<div><p>I should have asked for this before so I apologize since I know this has been a problem for you for several days. Can you attach your Data Definition XML? It's been difficult for me to pinpoint the problem looking at the code so I figure it may be easier if I can play around with your script on my local instance. While I could probably formulate the Data Definition based on this SOAP request, I want to make sure it's identical to yours so that I don't introduce any other problems.</p>
<p>Thanks</p></div>
Tim
tag:help-archives.hannonhill.com,2010-02-09:Comment/2608648
2010-08-30T19:27:06Z
2010-08-30T19:27:06Z
Handling multiple groups when using WSDL and PHP
<div><p>Actually, I figured out how to get around the issue of duplicate keys in the PHP array that builds the request. The encapsulation idea was spot on, but instead of encapsulating with arrays, you have to encapsulate with new instances of stdClass().</p>
<p>I figured this out when I did a simple read() call on an asset and examined the structure of the returned asset. I duplicated that structure. For reference, the following a var_dump of the read() call's return value. Note that there are many fields returned that are not required when creating/editing an asset.<br />
</p>
<pre><code>[asset] => stdClass Object
(
[workflowConfiguration] =>
[feedBlock] =>
[indexBlock] =>
[textBlock] =>
[xhtmlDataDefinitionBlock] =>
[xmlBlock] =>
[file] =>
[folder] =>
[page] => stdClass Object
(
[id] => 917340097f00010101c4ed65a1b191a8
[entityType] => stdClass Object
(
[name] => page
)
[name] => index
[parentFolderId] => 91733fdd7f00010101c4ed6518131138
[parentFolderPath] => About/About_our_Campus
[path] => About/About_our_Campus/index
[lastModifiedDate] => 2010-03-24T18:33:21.670Z
[lastModifiedBy] => bzera
[siteId] => 833e5b7a7f00010101624a1c2a18a1da
[siteName] => SANDBOX
[metadata] => stdClass Object
(
[author] =>
[displayName] =>
[endDate] =>
[keywords] =>
[metaDescription] =>
[reviewDate] =>
[startDate] =>
[summary] =>
[teaser] =>
[title] => Index Page
[dynamicFields] => stdClass Object
(
[dynamicField] => Array
(
[0] => stdClass Object
(
[name] => color-scheme
[fieldValues] => stdClass Object
(
[fieldValue] => stdClass Object
(
[value] =>
)
)
)
[1] => stdClass Object
(
[name] => link-divider
[fieldValues] => stdClass Object
(
[fieldValue] => stdClass Object
(
[value] =>
)
)
)
)
)
)
[metadataSetId] =>
[metadataSetPath] =>
[expirationFolderId] =>
[expirationFolderPath] =>
[expirationFolderRecycled] =>
[shouldBePublished] => 1
[shouldBeIndexed] => 1
[lastPublishedDate] => 2010-03-24T19:12:48.331Z
[lastPublishedBy] => bzera
[configurationSetId] =>
[configurationSetPath] =>
[contentTypeId] => 301507677f00010101c4ed654b68b645
[contentTypePath] => 3 Column
[structuredData] => stdClass Object
(
[definitionId] =>
[definitionPath] =>
[structuredDataNodes] => stdClass Object
(
)
)
[xhtml] =>
[pageConfigurations] => stdClass Object
(
[pageConfiguration] => Array
(
[0] => stdClass Object
(
[id] => 03ef64247f00010101a80747e2f34c71
[entityType] => stdClass Object
(
[name] => pageconfiguration
)
[name] => Breadcrumbs XML
[defaultConfiguration] =>
[templateId] => 05d98b687f0001010121631ebc52bc71
[templatePath] => _internal/templates/XML Preview
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[pageRegions] => stdClass Object
(
[pageRegion] => stdClass Object
(
[id] => 03ef64267f00010101a8074739d3ba28
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => DEFAULT
[blockId] => 060eefe47f0001010121631e953853b1
[blockPath] => _internal/blocks/Breadcrumbs
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
)
[outputExtension] =>
[serializationType] =>
[includeXMLDeclaration] =>
[publishable] =>
)
[1] => stdClass Object
(
[id] => af76722d7f00010101c4ed650a5bce2a
[entityType] => stdClass Object
(
[name] => pageconfiguration
)
[name] => Current Page XML
[defaultConfiguration] =>
[templateId] => 05d98b687f0001010121631ebc52bc71
[templatePath] => _internal/templates/XML Preview
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[pageRegions] => stdClass Object
(
[pageRegion] => stdClass Object
(
[id] => af7672307f00010101c4ed65056b5596
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => DEFAULT
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
)
[outputExtension] =>
[serializationType] =>
[includeXMLDeclaration] =>
[publishable] =>
)
[2] => stdClass Object
(
[id] => 301423df7f00010101c4ed651267f346
[entityType] => stdClass Object
(
[name] => pageconfiguration
)
[name] => Default
[defaultConfiguration] => 1
[templateId] => 05cef25c7f0001010121631e24084522
[templatePath] => _internal/templates/3 Column
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[pageRegions] => stdClass Object
(
[pageRegion] => Array
(
[0] => stdClass Object
(
[id] => 301423df7f00010101c4ed651b28d1a5
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => CSS
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 300fbd9a7f00010101c4ed65aa395a7d
[formatPath] => SANDBOX:_internal/formats/CSS Stylesheets
[formatRecycled] =>
[noFormat] =>
)
[1] => stdClass Object
(
[id] => 301423df7f00010101c4ed65c263246b
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => BREADCRUMBS
[blockId] => 060eefe47f0001010121631e953853b1
[blockPath] => _internal/blocks/Breadcrumbs
[blockRecycled] =>
[noBlock] =>
[formatId] => 300f38487f00010101c4ed65d7abbc9c
[formatPath] => SANDBOX:_internal/formats/Breadcrumbs
[formatRecycled] =>
[noFormat] =>
)
[2] => stdClass Object
(
[id] => 16c3cfe47f00010100d3e5cc934afaeb
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => PAGE-OPTIONS
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 16c2df127f00010100d3e5cc63590e7e
[formatPath] => SANDBOX:_internal/formats/Page Options
[formatRecycled] =>
[noFormat] =>
)
[3] => stdClass Object
(
[id] => 301423df7f00010101c4ed65eff4750d
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => DEPARTMENT-HEADER
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 301045187f00010101c4ed65a6c2b170
[formatPath] => SANDBOX:_internal/formats/Department Header
[formatRecycled] =>
[noFormat] =>
)
[4] => stdClass Object
(
[id] => 0fe05ef67f0001010121631e9086cbd3
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => TACTICAL-NAVIGATION
[blockId] => 0fdb85e97f0001010121631e4fc209d7
[blockPath] => _internal/blocks/Tactical Navigation
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
[5] => stdClass Object
(
[id] => 295839167f0001010121631ea8e0bc02
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => ADDITIONAL-LINKS
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 29578f337f0001010121631e37b84ce5
[formatPath] => _internal/formats/Additional Links
[formatRecycled] =>
[noFormat] =>
)
[6] => stdClass Object
(
[id] => 2951ccf47f0001010121631e1b9c66a7
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => ANALYTICS
[blockId] => 294ecd067f0001010121631e79cc93c1
[blockPath] => _internal/blocks/Analytics
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
[7] => stdClass Object
(
[id] => 7c4fae8f7f0001010121631e66af26da
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => BANNER-IMAGE
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 330901397f0001010121631ea7fd5138
[formatPath] => _internal/formats/Banner Image
[formatRecycled] =>
[noFormat] =>
)
[8] => stdClass Object
(
[id] => 52ecce047f000101013c31c8c7ed7d83
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => INTRUDERS
[blockId] => 70b2f6007f000101013c31c84a195767
[blockPath] => _internal/blocks/Random Intruders
[blockRecycled] =>
[noBlock] =>
[formatId] => 52ee046a7f000101013c31c8cd0f8834
[formatPath] => _internal/formats/Intruders
[formatRecycled] =>
[noFormat] =>
)
[9] => stdClass Object
(
[id] => 301423df7f00010101c4ed654260832f
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => RIGHT-HAND-NAVIGATION
[blockId] => 1540ab2b7f0001010121631ef360188a
[blockPath] => _internal/blocks/Right-Hand Navigation
[blockRecycled] =>
[noBlock] =>
[formatId] => 3011a3c67f00010101c4ed652f61cb0c
[formatPath] => SANDBOX:_internal/formats/Right Column Navigation
[formatRecycled] =>
[noFormat] =>
)
[10] => stdClass Object
(
[id] => 7c4fae907f0001010121631e2af92863
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => COLOR-SCHEME-SELECT
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 7c5990aa7f0001010121631e60a36eaa
[formatPath] => _internal/formats/Select Color Scheme
[formatRecycled] =>
[noFormat] =>
)
[11] => stdClass Object
(
[id] => 7c4fae8f7f0001010121631ef8bebd0f
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => DEFAULT
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 08c9ce547f00010101e160284cc3122f
[formatPath] => _internal/formats/Main Content
[formatRecycled] =>
[noFormat] =>
)
[12] => stdClass Object
(
[id] => 0f6d2e4a7f0001010121631ea276f1ae
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => JAVASCRIPT
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 0f6c60537f0001010121631ea3ab8d0c
[formatPath] => _internal/formats/Javascript
[formatRecycled] =>
[noFormat] =>
)
[13] => stdClass Object
(
[id] => 149b4d6e7f0001010121631e298f38e9
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => PRIMARY-NAVIGATION
[blockId] => 145d91907f0001010121631eeaa2ecd6
[blockPath] => _internal/blocks/Primary Navigation
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
[14] => stdClass Object
(
[id] => a120fc0e7f0001010070a44640b60e71
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => FOOTER
[blockId] => 0ef100d97f0001010121631e03b14c70
[blockPath] => _internal/blocks/Current Page
[blockRecycled] =>
[noBlock] =>
[formatId] => 6b95d7b37f00010101a807471a9533f0
[formatPath] => _internal/formats/Footer
[formatRecycled] =>
[noFormat] =>
)
)
)
[outputExtension] =>
[serializationType] =>
[includeXMLDeclaration] =>
[publishable] =>
)
[3] => stdClass Object
(
[id] => 049d11297f00010101a80747fceb0897
[entityType] => stdClass Object
(
[name] => pageconfiguration
)
[name] => Right Column Navigation XML
[defaultConfiguration] =>
[templateId] => 05d98b687f0001010121631ebc52bc71
[templatePath] => _internal/templates/XML Preview
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[pageRegions] => stdClass Object
(
[pageRegion] => stdClass Object
(
[id] => 049d112b7f00010101a807472337976c
[entityType] => stdClass Object
(
[name] => pageregion
)
[name] => DEFAULT
[blockId] => 1540ab2b7f0001010121631ef360188a
[blockPath] => _internal/blocks/Right-Hand Navigation
[blockRecycled] =>
[noBlock] =>
[formatId] =>
[formatPath] =>
[formatRecycled] =>
[noFormat] =>
)
)
[outputExtension] =>
[serializationType] =>
[includeXMLDeclaration] =>
[publishable] =>
)
)
)
)
[reference] =>
[xsltFormat] =>
[scriptFormat] =>
[symlink] =>
[template] =>
[user] =>
[group] =>
[role] =>
[assetFactory] =>
[assetFactoryContainer] =>
[contentType] =>
[contentTypeContainer] =>
[connectorContainer] =>
[twitterConnector] =>
[wordPressConnector] =>
[pageConfigurationSet] =>
[pageConfigurationSetContainer] =>
[dataDefinition] =>
[dataDefinitionContainer] =>
[metadataSet] =>
[metadataSetContainer] =>
[publishSet] =>
[publishSetContainer] =>
[target] =>
[siteDestinationContainer] =>
[destination] =>
[fileSystemTransport] =>
[ftpTransport] =>
[databaseTransport] =>
[transportContainer] =>
[workflowDefinition] =>
[workflowDefinitionContainer] =>
[site] =>
)</code></pre></div>
Bryan Zera