Calling Lotus Notes Agent from XML

Hi All,

I need an urgent help. I am using a XML object to call an Agent from the web. It works absolutely fine when the document is new. But it does not when the document is saved and edited again. And then if the agent is called it gives me problem.

The code to call the agent is:

req.open(“GET”, url, false);

Where url = “GetCreditScore?OpenAgent&EstYear=” + mEstYr;

When this agent is run on server from web when the document is new it works perfectly fine. But after I save the document and call this agent again when the document is edited again it gives me following error:

02/23/2007 11:36:54 AM HTTP Web Server: Invalid URL Exception [/dav3.nsf/e2cc1e3b25bf5b0a652572210063847d/GetCreditScore?OpenAgent&EstYear=2002]

The error is generated due to the fact that it is adding the Document Unique ID After Database name. This URL is created by the system by itself. Can someone help me how to avoid the document Unique ID to get added in the URL.

Please help me as I need to make this application live at the earliest.

Thanks in Advance.

Siddhartha

Subject: Calling Lotus Notes Agent from XML

Hi,

You need to look at how the URL is getting generated, the document unid is getting prepended to it-

[/dav3.nsf/e2cc1e3b25bf5b0a652572210063847d/GetCreditScore?OpenAgent&EstYear=2002]

should be -

[/dav3.nsf/GetCreditScore?OpenAgent&EstYear=2002]

Cheers,

Andrew

Subject: Calling Lotus Notes Agent from XML

hi All,

Thanks for the help. Gerry King it worked after I gave the full relative path rather then just what I was doing. I had tried sending with db name before but then it did not worked so I did not tried full path. But after your suggestion I tried and it works absolutely fine.

Siddhartha

Subject: Calling Lotus Notes Agent from XML

Have you tried using the full url (http…) rather than a relative one?

Subject: RE: Calling Lotus Notes Agent from XML

Try url = “/GetCreditScore?OpenAgent&EstYear=” + mEstYr;

instead of

url = “GetCreditScore?OpenAgent&EstYear=” + mEstYr;

Regards,

Munish Kaushik