Hi All,
I need your help urgently please help me.
This is normal html file which has one textArea and one send button. when user click this send button the text area content get posted via POST method of the form tag.
ValueFirst Pace Client API version 1.2 <?xml version="1.0" encoding="ISO-8859-1"?>Now the Same functionality i wanted to build in my lotusscript through agent. When user save the document the my script create the xml content i.e
<?xml version="1.0" encoding="ISO-8859-1"?>full-fill all the parameters and send this data as much like what my above html file is doing.
I also wrote an agent to do this task but not working properly
---------------- The Agent is -----------------
Sub Initialize
Dim s As New NotesSession
Dim doc As NotesDocument
Dim objHttp As Variant
Dim response As String
Dim request As String
Set db = s.CurrentDatabase
Set doc = s.DocumentContext
Msgbox "hello1"
Dim objXMLHTTP, objXMLDOM, objTitles, objURLs, i
Set objHttp = CreateObject("Microsoft.XMLHTTP")
url = |http://api.myvaluefirst.com/psms/servlet/psms.Eservice2|
req = |http://api.myvaluefirst.com/psms/servlet/psms.Eservice2?data=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22ISO-8859-1%22%3F%3E%0A%3C%21DOCTYPE%20MESSAGE%20SYSTEM%20%22http%3A//127.0.0.1/psms/dtd/messagev12.dtd%22%20%3E%0A%3CMESSAGE%20VER%3D%221.2%22%3E%0A%3CUSER%20USERNAME%3D%22XXX%22%20PASSWORD%3D%22XXX%22/%3E%0A%3CSMS%20%20UDH%3D%220%22%20CODING%3D%221%22%20TEXT%3D%22Testing%22%20PROPERTY%3D%220%22%20ID%3D%221%22%3E%0A%3CADDRESS%20FROM%3D%22vikas%22%20TO%3D%229899817270%22%20SEQ%3D%221%22%20TAG%3D%22some%20clientside%20random%20data%22%20/%3E%0A%3C/SMS%3E%0A%3C/MESSAGE%3E%0A&action=send|
objHttp.open "POST", url, False, "", ""
Msgbox "hello2"
objHttp.send(req)
Print "<SCRIPT LANGUAGE=JavaScript>"
Print "location.href = """&"http://api.myvaluefirst.com/psms/servlet/psms.Eservice2?data=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22ISO-8859-1%22%3F%3E%0A%3C%21DOCTYPE%20MESSAGE%20SYSTEM%20%22http%3A//127.0.0.1/psms/dtd/messagev12.dtd%22%20%3E%0A%3CMESSAGE%20VER%3D%221.2%22%3E%0A%3CUSER%20USERNAME%3D%22XXX%22%20PASSWORD%3D%22XXX%22/%3E%0A%3CSMS%20%20UDH%3D%220%22%20CODING%3D%221%22%20TEXT%3D%22Testing%22%20PROPERTY%3D%220%22%20ID%3D%221%22%3E%0A%3CADDRESS%20FROM%3D%22vikas%22%20TO%3D%229899817270%22%20SEQ%3D%221%22%20TAG%3D%22some%20clientside%20random%20data%22%20/%3E%0A%3C/SMS%3E%0A%3C/MESSAGE%3E%0A&action=send"""
Print "</SCRIPT>"
Msgbox req
Msgbox "hello"
End Sub
if i remove
Print “”
Print "location.href = """&"http://api.myvaluefirst.com/psms/servlet/psms.Eservice2?data=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22ISO-8859-1%22%3F%3E%0A%3C%21DOCTYPE%20MESSAGE%20SYSTEM%20%22http%3A//127.0.0.1/psms/dtd/messagev12.dtd%22%20%3E%0A%3CMESSAGE%20VER%3D%221.2%22%3E%0A%3CUSER%20USERNAME%3D%22demoabc%22%20PASSWORD%3D%22abcconsultants%22/%3E%0A%3CSMS%20%20UDH%3D%220%22%20CODING%3D%221%22%20TEXT%3D%22Testing%22%20PROPERTY%3D%220%22%20ID%3D%221%22%3E%0A%3CADDRESS%20FROM%3D%22vikas%22%20TO%3D%229899817270%22%20SEQ%3D%221%22%20TAG%3D%22some%20clientside%20random%20data%22%20/%3E%0A%3C/SMS%3E%0A%3C/MESSAGE%3E%0A&action=send"""
Print "</SCRIPT>"
this code from above agent it is not working but if i attached it is
working fine.
Is it possible. If yes please help and suggest me what ever possible solutions.
Thanks in advance
With Regards,
Vikas