Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using the Cascade Server Web Service API, by Artur Tomusiak


Published on

In this session, we will show you how to execute web services operations. Although our language of choice will be PHP, most of the material can be applied to other languages as well. You will also learn how to understand Cascade's wsdl file without looking up any additional documentation. We will go through example code for the most commonly used operations. This session is for users who have basic programming knowledge and would like learn how to write automated scripts for Cascade Server.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Using the Cascade Server Web Service API, by Artur Tomusiak

  1. 1. Cascade Server Web Services Artur Tomusiak Senior Software Developer
  2. 2. IntroductionWhats Ahead:• What is a web service?• Real life applications• Cascade Server Web Services Operations• Understanding the WSDL file• Code examples for most commonly used operations• What is coming in Cascade Server 7.2?
  3. 3. What is a web service?Web Service is a way to communicate between your own application and Cascade Server. Cascade Server uses SOAP for web services which uses XML format to send and receive information
  4. 4. Real life applications• Importing/exporting content• Handling form submissions• Updating access rights on multiple assets for a single user or group• Advanced bulk change• Bulk update content• Selective publishing of specific assets only• Data Definition Page to Data Definition Block conversion
  5. 5. AuthenticationEach operation needs to be authenticated using ausername and passwordThe operation is then executed as if that Userperformed the operation in the web UI: • Given User is the author of the operation • Permissions and abilities are verified • Audits are created for that User
  6. 6. Available operations ws/servicesMost frequently used operations:• Create• Read• Edit• Delete• Copy• Read/Edit Access Rights• Publish
  7. 7. WSDL Filehttp://.../ws/services/AssetOperationService?wsdl
  8. 8. Important keywords in WSDL "complexType" and "simpleType"
  9. 9. Important keywords in WSDL "element"Attributes: "minOccurs", "maxOccurs" and "type" Comments
  10. 10. Important keywords in WSDL "extension"
  11. 11. Important keywords in WSDL "choice"
  12. 12. WSDL reading exampleFind necessary elements to create an XML Block
  13. 13. WSDL reading example
  14. 14. WSDL reading example
  15. 15. WSDL reading example
  16. 16. WSDL reading example
  17. 17. WSDL reading example
  18. 18. WSDL reading example
  19. 19. WSDL reading example
  20. 20. WSDL reading exampleRequired: • xml • parentFolderId or parentFolderPath • nameOptional: • expirationFolderId or expirationFolderPath • metadataSetId or metadataSetPath • Metadata fields (title, displayName, etc.) • siteId or siteName
  21. 21. PHP code examples Client and authentication
  22. 22. PHP code examples Create
  23. 23. PHP code examples Create
  24. 24. PHP code examples Read
  25. 25. PHP code examples Read
  26. 26. PHP code examples Read
  27. 27. PHP code examples Edit
  28. 28. PHP code examples Edit
  29. 29. PHP code examples Delete
  30. 30. PHP code examples Copy
  31. 31. PHP code examples Copy
  32. 32. PHP code examples Copy
  33. 33. PHP code examples ReadAccessRights
  34. 34. PHP code examples EditAccessRights
  35. 35. PHP code examples EditAccessRights
  36. 36. PHP code examples Sample-Project Use correct branch Not always backwards compatibleFollow "Web Services Changelog" for each version
  37. 37. Limitations• Can’t access past versions of assets and drafts• Can’t render assets• Can’t use tools• Can’t change preferences• Can’t change configuration files• Can’t view or interact with publish queue• Certain operations can be limited
  38. 38. What is coming in Cascade 7.2• ListAllSites• ReadWorkflowSettings• EditWorkflowSettings• ListSubscribers• Providing Destinations when publishing• “Maintain absolute links” for Pages
  39. 39. Questions
  40. 40. Thank you Artur