Using the Cascade Server Web Service API, by Artur Tomusiak
-
Upload
hannonhill -
Category
Technology
-
view
711 -
download
5
description
Transcript of Using the Cascade Server Web Service API, by Artur Tomusiak
![Page 1: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/1.jpg)
Artur TomusiakSenior Software Developer
Cascade Server Web Services
![Page 2: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/2.jpg)
Introduction
What's 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?
![Page 3: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/3.jpg)
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
![Page 4: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/4.jpg)
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
![Page 5: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/5.jpg)
Authentication
Each operation needs to be authenticated using a username and password
The operation is then executed as if that User performed 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
![Page 6: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/6.jpg)
Available operations
http://yourcascadeinstance.com/ws/services
Most frequently used operations:• Create• Read• Edit • Delete• Copy• Read/Edit Access Rights• Publish
![Page 7: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/7.jpg)
WSDL File
http://.../ws/services/AssetOperationService?wsdl
![Page 8: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/8.jpg)
Important keywords in WSDL
"complexType" and "simpleType"
![Page 9: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/9.jpg)
Important keywords in WSDL
"element"Attributes: "minOccurs", "maxOccurs" and "type"
Comments
![Page 10: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/10.jpg)
Important keywords in WSDL
"extension"
![Page 11: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/11.jpg)
Important keywords in WSDL
"choice"
![Page 12: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/12.jpg)
WSDL reading example
Find necessary elements to create an XML Block
![Page 13: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/13.jpg)
WSDL reading example
![Page 14: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/14.jpg)
WSDL reading example
![Page 15: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/15.jpg)
WSDL reading example
![Page 16: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/16.jpg)
WSDL reading example
![Page 17: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/17.jpg)
WSDL reading example
![Page 18: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/18.jpg)
WSDL reading example
![Page 19: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/19.jpg)
WSDL reading example
![Page 20: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/20.jpg)
WSDL reading example
Required:• xml• parentFolderId or parentFolderPath• name
Optional:• expirationFolderId or expirationFolderPath• metadataSetId or metadataSetPath• Metadata fields (title, displayName, etc.)• siteId or siteName
![Page 21: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/21.jpg)
PHP code examplesClient and authentication
![Page 22: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/22.jpg)
PHP code examplesCreate
![Page 23: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/23.jpg)
PHP code examplesCreate
![Page 24: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/24.jpg)
PHP code examplesRead
![Page 25: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/25.jpg)
PHP code examplesRead
![Page 26: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/26.jpg)
PHP code examplesRead
![Page 27: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/27.jpg)
PHP code examplesEdit
![Page 28: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/28.jpg)
PHP code examplesEdit
![Page 29: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/29.jpg)
PHP code examplesDelete
![Page 30: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/30.jpg)
PHP code examplesCopy
![Page 31: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/31.jpg)
PHP code examplesCopy
![Page 32: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/32.jpg)
PHP code examplesCopy
![Page 33: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/33.jpg)
PHP code examplesReadAccessRights
![Page 34: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/34.jpg)
PHP code examplesEditAccessRights
![Page 35: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/35.jpg)
PHP code examplesEditAccessRights
![Page 36: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/36.jpg)
PHP code examples
https://github.com/hannonhill/Webservices-PHP-Sample-Project
Use correct branch
Not always backwards compatible
Follow "Web Services Changelog" for each version
http://www.hannonhill.com/kb/Web-Services/Web%20Services%20Changelog/index.html
![Page 37: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/37.jpg)
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
![Page 38: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/38.jpg)
What is coming in Cascade 7.2
• ListAllSites• ReadWorkflowSettings• EditWorkflowSettings• ListSubscribers• Providing Destinations when publishing• “Maintain absolute links” for Pages
![Page 39: Using the Cascade Server Web Service API, by Artur Tomusiak](https://reader036.fdocuments.net/reader036/viewer/2022081515/558bb081d8b42a78408b46d4/html5/thumbnails/39.jpg)
Questions