Script to generate and return UUID

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
The script below invokes the SOAPUtil.generateUUID() method to return a string containing a univserally unique ID (UUID)

CODE
###  Name:    generateUUID
###  Author:  Mark Carlson
###  Date:    09/15/2006
###
###  Description: Uses Parasoft API to generate universally unique ID (UUID)
###
###  Usage:  Returns string containing uuid
###
from soaptest.api import *
from com.parasoft.api import *

def generateUUID():
 uuid = SOAPUtil.generateUUID()  #invokes generateUUID API method to get UUID
#  Application.showMessage("UUID = " + uuid) #output uuid for debugging
 return uuid
#  return SOAPUtil.getXMLFromString([str(uuid)]) #uncomment to return uuid as an XML string
Tagged:
Sign In or Register to comment.