dongze5043 2012-06-05 09:44
浏览 53
已采纳

通过perl脚本在Lotus Domino数据库中创建文档

I've seen blocks of code like this

use Win32::OLE; 
my $Notes = Win32::OLE->new('Notes.NotesSession') 
    or die "Cannot start Lotus Notes Session object.
"; 
my $database = $Notes->GetDatabase("",'mail\VIMM.nsf'); 

but my script is running on a virtual webfusion apache service so how do you establish a connection to database on my domino server, I have control of its acl and its a website so can pass in a username & password. The script & 'POST' data is sent by a third party gateway with results of the transaction (Success/ Fail + name value pairs etc) which I need to capture. I can't do it directly on the domino server because although Domino supports PERL scripts, they will only work if PERL is also installed on the server which isn't an option.

  • 写回答

5条回答 默认 最新

  • duan19740319 2012-06-26 21:01
    关注

    The underlying problem is that a url such as http://www.mysite.com/thankyou?orderno=123 won't work in a Lotus Domino website because the ? is a special character (eg ?openagent, ?opendatabase) to the Domino web engine. You also can't use http://www.mysite.com/(thankyou)?openagent?orderno=456 (I tried), in both cases all you get is 404 page not found error and a domino log error "don't understand the url". The question was originally asking for help with Perl to solve the problem but I couldn't Perl scripts to run on my webfusion community server but fortunately quickly had success with this simple php script:

    <?php
        $params = "";
        $url = "http://www.mywebsite.co.uk/";
        $path = "wpx/website.nsf/httpagent?openagent";
          if($_GET) {
        $kv = array();
              foreach ($_GET as $key => $value) {
                  $kv[] = "$key=$value";
              }
              $params = join("&", $kv);
    }
    print "<script>window.location.href=\"" . $url . $path . "&" . $params . "\"</script>";
    ?>
    

    The script is placed on my webfusion server under a subdomain which effectively translates the url into a format that Domino can handle, the format ?openagent&orderno=456 is easily handled by either a java or Lotusscript agent, the parameter is extracted from the CGI Request_Content field.

    The redirect means I don't for now need to manipulate data in the domino database directly, it also means that with the exception of the url translation script all the website code is in the domino database.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题