Fetch Data from Website in XML format

Dear Friends,

I need you help to fetch data from a website “https://www.tgasime.health.gov.au/SIME/ARTG/ARTGPublicWeb.nsf/MEDpublic?readviewentries&Start=1&count=100”, I am able to fetch the data when I run the agent manually, but when it is schedule on Server the .open method returns null…

Following is the explaination of what i am trying to do…

url = “https://www.tgasime.health.gov.au/SIME/ARTG/ARTGPublicWeb.nsf/MEDpublic?readviewentries&Start=“+Cstr(MinCounter)+”&count=”+Cstr(Counter) – URL Which fetches data

Call XMLHTTPObj.open(“GET”,url,False,FID, FPassword) — To get the data

Call XMLHTTPObj.send(Null) –

XMLHTTPObj.responseText – returns the response in Xml Format…

once i get the response text… i do the following code…

Set domParser = Session.CreateDOMParser(XMLtext$)

domParser.Process

after the above statement…i traverse the xml that i have received as a response text…

Set rootElement = domParser.Document.DocumentElement

Set rootAttributeNode = rootElement.GetAttributeNode(“toplevelentries”)

etc/…

as i told you, i am able to run the agent when I am running it manually from my local pc…but when it is scheduled on server…it doesnt…work…after,also I am unable to run the agent manually on server…

Call XMLHTTPObj.open(“GET”,url,False,FID, FPassword) —

Call XMLHTTPObj.send(Null) –

i.e it returns nothing…

Kindly help & guide for the same,

Thanks in Advance,

Sneha

Subject: Fetch Data from Website in XML format

Sneha

It seems like your creating “XMLHTTPObj” object using Lotus Script.

When you run agent locally it’s finding “Object” so it’s working fine. but when you create schedule script don’t find the object.

XMLHTTPObj will come with IE not with Windows.

Instad of using “XMLHTTPObj” use Java HTTP Object.

Good luck

Johon

Subject: RE: Fetch Data from Website in XML format

Hi Johon,

Thanks for the reply,

Could you give me any dummy code to create any java HTTP object ?