Saturday, August 22, 2009

Create a new webService based on an existing content sever service

In latest release of Oracle UCM (10gR3 release), WSDLGenerator component has became one of the system components, which means when we install UCM, we will have that component installed and enabled for us to be used. That component is very important, because it facilitates the integration with Oracle UCM, i.e. we got 8 WSDL files with this component that WSDL files give us the most required webservices like a webservice for checking in a content.

But sometimes, we want to have some other webservices based on an existing content server service that service may be created by you. Next I will show you how to create a webservice that can create a virtual folder, the new webserice name will be CreateFolder, where that webservice will be based on COLLECTION_ADD -content server service.

Note all WSDL files are saved under the following path [UCM_INSTALL_DIR]/weblayout/groups/secure/wsdl/custom/

Steps For How To Create "CreateFolder" Webservice
1- Login as sysadmin user

2- Under Administration menu, click on the menu item Soap Wsdls, then Wsdl List page will open
3- From Actions menu choose Add WSDL


4- Next add the Wsdl Name which will be Folders and add Wsdl Description

5- Then Click on Add button, then you will be directed to Wsdl Information Page
6- Inside Wsdl Information Page, from Actions menu choose Add Service


7- Next add the Webservice Name, which will be CreateFolder, and IdcService Name which will be Collection_ADD


8- Then click on Add button, then you will return to the Wsdl Information Page again, and you can see a new webservice has been added to Services list
9- Click on Edit for the webservice CreateFolder, you will be directed to the Service Information Page


10- From Actions Menu, choose Update Request Parameters, and add the following parameters
Note:
The request (input) parameters for COLLECTION_ADD IdcService are divided to three parts,
the first part is related to folder information (first five parameters), the second part is the default metadata fields for the folder where any content added to the folder will inherent the metadata values, we can add them one by one or we can use another predefined type (d:CommonDocMetaFields) that holds all of them, and the third part is the custom metadatafields, also we have a predefined type (propertylist:CustomDocMeta) that will define them to be taken dynamically with specific names (you can add them one by one but in that case they will be static so if you deleted any custom metadata field you need to remove it manually from the Wsdl file)

11- From Actions Menu, choose Update Response Parameters, and add the following parameter

12- Inside Service Information Page click on update
13- Inside Wsdl Information Page click on update
14- Now you are in Wsdl List Page, from Actions menu, choose Generate Wsdls

Next after creating the webservice, we need to test it, we can do this using a Webservice testing tool, I am using SoapUI.

8 comments:

Germany said...

Hi, thanks a lot, this was very helpful for what I was tried to do. But now I have a new question: do you know how to obtain the url location of a document that I just checked in???

Thank you for your help

Unknown said...

Which service you have used?

Germany said...

I have used CheckIn and DocInfo

Unknown said...

There is no service that will return to you the file URL, but you tow options
1- Use Get_File webservice to download the file

2- You can constitute the URL by yourself using the metadata fields values (dContentID, dSecurityGroup, dDocType, dOriginalName)

Anonymous said...

This is great info. Would you tell me how I can discover the request and response parameters? Where are these documented? The services reference guide doesn't refer to the same names in your sample.

Unknown said...

70% percent of the information you need comes from services reference guide and the rest 30% is not documented and will come from your understanding to the UCM services.

But most of the time you don't need the 30% and remember you can create your own service to do any complex thing you need in the back end.

Anonymous said...

Hello, how do you figure out which parameters go for the service. For example, COLLECTION_INFO - if i wanted to create a service for this one...how do i find the parameters required for this request?

Please, help.
Thanks,
Darshita

Unknown said...

either it will be documented on Services guide or from a webpage source code we can get it