Schlagwort-Archive: IBM Doors

IBM Doors DXL: Call REST Services / REST-Services aufrufen


Von Doors aus sollen REST Services aufgerufen werden.

REST Services shall be called within a DXL Script in IBM Doors

Approach – Ansatz

Usage of OLE Automization

Solution – Lösung

pragma runLim,0
OleAutoArgs args = create
OleAutoArgs args2 = create
OleAutoObj http = oleCreateAutoObject("WinHttp.WinHttpRequest.5.1")
void sendResult(string commandId, string result) {
	put(args, "POST")
	put(args, "" commandId "/result")
	OleAutoArgs args2 = create
	put(args2, result)
	oleMethod(http, "open", args)
	string res = oleMethod(http, "send", args2)
				print "\n" stringOf(dateAndTime(today)) ": Sending data data Failed"
				print "\n" res
Regexp lines = regexp ".*"
bool connected = true
while(connected) {
	put(args, "GET")
	put(args, "")
	oleMethod(http, "open", args)
	oleMethod(http, "send")
	int status
	oleGet(http, "status", status)
	connected = status == 200
	string response
	oleGet(http, "responseText", response)
	print "RESPONSE:" response "\n"
	lines response
	string commandId = response[0:end 0]
	string resultUrl = "" commandId "/result"
	string command = "pragma runLim,0\nstring resultUrl = \"" resultUrl "\"\n" response[end 0+2:]
	sendResult(commandId, eval_(command))

IBM Doors DXL: Send email via Doors Client


Emails should be send via DXL script.


The Doors Client should have access to a SMTP Server on it’s configured port (normally 25)

Right-click the doors database icon in the database explorer and make the following setttings:


string smtpServer = getDatabaseMailServer();
string smtpFrom = "Superman";
string smtpFrom2 = getDatabaseMailServerAccount();
string smtpTo = "";
string smtpSubject = "test";
string smtpMessage = "this is a test";

print "Mail Server Name: " smtpServer "\n";
print "Mail from account: " smtpFrom2 "\n\n";
bool b = sendEMailNotification(smtpFrom, smtpTo, smtpSubject, smtpMessage);

if (b) {
   print "Message sent\n";
} else {
   print "Could not send message.\n";