Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Jython Code to Capture UCM cloud response — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Jython Code to Capture UCM cloud response

edited May 27, 2019 10:27AM in Content Management


Any file uploaded to UCM cloud gives a response that contains the same tag for all the elements with different Attribute values.

Here is a small Jython snippet that could be used for fetching the content id and placing that into a Test file.

This can be res used for any integrations that have middle ware usage like ODI, ICS, Mulesoft.

Code Snippet

import os;
import datetime;
import time;

from xml.dom import minidom
doc = minidom.parse('C:/Oracle'+'/'+'UCM Response.xml')

name = doc.getElementsByTagName('ns2:Field')

file = open('C:/Oracle'+'/'+'dDocName.txt',"w+")
for s in name :
   if s.attributes['name'].value == 'dDocName':
      file.write ('%s' % (s.firstChild.nodeValue))

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!