We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
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

Question
8
Views
0
Comments
edited May 27, 2019 10:27AM in Content Management

Content

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))
file.close()

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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