Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Accessing URLS from DXL
Topic Summary:
Created On: 11-Apr-2005 15:02
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Richard Stedham, on Thursday, June 2, 2005 9:46 AM

Answer:
Thanks, that was the start I needed. The following then gets the result which could be processed.

// Create the Internet Explorer Application and open it
OleAutoObj theIEApp = oleCreateAutoObject("InternetExplorer.Application")

// Check the object was created
if(null theIEApp){
infoBox "ERROR: Null IEApp. Problem creating IE Application."
}else{
// create an OleAutoArgs object to store the help file location
OleAutoArgs args = create

// the URL you call in the next line
put(args, "http://URLtoaccess")

// call the "Navigate" method of the IE Application OleAutoObj object
// passing in the args OleAutoArgs object which contains the URL as
// a string
oleMethod(theIEApp, "Navigate", args)
OleAutoObj IEDocument = null
OleAutoObj IEBody = null
// Loop to give IE time to get the page
int count = 0
while (count <= 1000 and IEDocument == null) {
oleGet(theIEApp, "Document", IEDocument)
count = count + 1
}
if (null IEDocument) {
infoBox "ERROR: Null IEDocument. Problem getting the Document object."
} else {
// Loop to give IE time to get the page
count = 0
while (count <= 1000 and IEBody == null) {
oleGet(IEDocument, "body", IEBody)
count = count + 1
}
if (null IEBody) {
infoBox "ERROR: Null IEBody. Problem getting the Document.body object."
} else {
string theHTML = ""
// Now get the HTML between the BODY tags
result = oleGet(IEBody, "innerHTML", theHTML)
if (result != null) print result "\n"
print theHTML
}
}
// Tidy up. The OLE object seems to tidy itself up
delete(args)
}
 11-Apr-2005 15:02
User is offline View Users Profile Print this message


Richard Stedham

Posts: 19
Joined: 10-Dec-2003

Has anybody got advice on how we can use DOORS/DXL to access URLS, accept the response and process it. This way we can integrate with some of our web based tools.

One option may be to use OLE and drive Internet Explorer, which is on all our desktops.
Report this to a Moderator Report this to a Moderator
 18-Apr-2005 05:26
User is offline View Users Profile Print this message


werner kolze

Posts: 19
Joined: 30-Oct-2003

// Create the Internet Explorer Application and open it
OleAutoObj theIEApp = oleCreateAutoObject("InternetExplorer.Application")

// Make the Internet Explorer window visible - by default it is invisible
if(null theIEApp){
infoBox "ERROR: Null IEApp. Problem creating IE Application."
}else{
// Set the value of the "visible" property for the IE Application automation object to true
olePut (theIEApp, "visible", true)
}

// create an OleAutoArgs object to store the help file location
OleAutoArgs args = create

// determine DOORS install directory
string htmlDIR = "C:\\Program Files\\Telelogic\\Doors"

// use this line (for htmlDIR ) if running off a server
// string htmlDIR = getenv("DOORSHOME")

// the htm file you call in the next line, MUST exist in the directory - of course
put(args, htmlDIR "\\C:\\cnt.htm")

// call the "Navigate" method of the IE Application OleAutoObj object
// passing in the args OleAutoArgs object which contains the URL as
// a string
oleMethod(theIEApp, "Navigate", args)

================================================
copy this into the dxl editor, (module or database manager);
that script "fires up" Internet Explorer. with the predetermined file.

hope this is the start of what you're describing and having an "issue" with.
Werner


-------------------------
werner.kolze@baesystems.com
Report this to a Moderator Report this to a Moderator
 2-Jun-2005 09:46
User is offline View Users Profile Print this message


Richard Stedham

Posts: 19
Joined: 10-Dec-2003

Answer Answer
Thanks, that was the start I needed. The following then gets the result which could be processed.

// Create the Internet Explorer Application and open it
OleAutoObj theIEApp = oleCreateAutoObject("InternetExplorer.Application")

// Check the object was created
if(null theIEApp){
infoBox "ERROR: Null IEApp. Problem creating IE Application."
}else{
// create an OleAutoArgs object to store the help file location
OleAutoArgs args = create

// the URL you call in the next line
put(args, "http://URLtoaccess")

// call the "Navigate" method of the IE Application OleAutoObj object
// passing in the args OleAutoArgs object which contains the URL as
// a string
oleMethod(theIEApp, "Navigate", args)
OleAutoObj IEDocument = null
OleAutoObj IEBody = null
// Loop to give IE time to get the page
int count = 0
while (count <= 1000 and IEDocument == null) {
oleGet(theIEApp, "Document", IEDocument)
count = count + 1
}
if (null IEDocument) {
infoBox "ERROR: Null IEDocument. Problem getting the Document object."
} else {
// Loop to give IE time to get the page
count = 0
while (count <= 1000 and IEBody == null) {
oleGet(IEDocument, "body", IEBody)
count = count + 1
}
if (null IEBody) {
infoBox "ERROR: Null IEBody. Problem getting the Document.body object."
} else {
string theHTML = ""
// Now get the HTML between the BODY tags
result = oleGet(IEBody, "innerHTML", theHTML)
if (result != null) print result "\n"
print theHTML
}
}
// Tidy up. The OLE object seems to tidy itself up
delete(args)
}
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.