![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Accessing URLS from DXL Topic Summary: Created On: 11-Apr-2005 15:02 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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) } | |
![]() |
|
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. |
|
![]() |
|
![]() |
|
// 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 |
|
![]() |
|
![]() |
|
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) } |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Accessing URLS from DXL
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.