【问题标题】:Work with MTOM in Lotus Notes在 Lotus Notes 中使用 MTOM
【发布时间】:2018-07-01 04:13:42
【问题描述】:

我们有一个任务是创建使用 MTOM 的 Lotus Notus Web 服务使用者。
有人可以帮忙制作吗?
我曾尝试创建 Web 服务提供程序,但它不起作用。 这是提供者的代码:

 @MTOM(enabled= true)
 public class Mtomservice{  
@SuppressWarnings("finally")
public Response getResponse (byte[] arg0) {
    Response response = new Response ();
    try{
        String filePath = WebServiceBase.getCurrentSession().getEnvironmentString("Directory", true)+"/PretenzMtom_3.pdf";
        FileOutputStream fileOut = new FileOutputStream(new File(filePath));
        fileOut.write(arg0);


        response.setResponseststus("OK");

    } catch (Exception e) {
        e.printStackTrace();
        response.setResponseststus("error");
        StringWriter errors = new StringWriter();
        e.printStackTrace(new PrintWriter(errors));

        response.setResponseErrorText(errors.toString());

    }

    finally {
        return response;
    }

}

}

【问题讨论】:

  • 您需要比“它不起作用”更具体。它会崩溃吗?会挂吗?它会抛出异常吗?还有什么?准确地告诉我们您期望发生的事情,并准确地告诉我们实际发生的事情。否则,没有人可以帮助你。,

标签: java soap lotus-notes mtom


【解决方案1】:

你可以试试这个:

  1. 在 Designer 中导入您的 WebService WSDL。
  2. 将自动生成的 WS 中的所有代码放入 Java ScriptLibrary。
  3. 在消费者中使用库。
  4. 如果你没有 WSDL,你可以自己写。

另一种也是最好的方法: 使用“Domino OSGi Task”和插件,但为此您需要在服务器上安装“OpenSocial Component”。此任务围绕 HTTP 任务运行。如何?谷歌,请,万维网中有很多例子。

为此,您需要 Domino 9.0.1+

【讨论】:

  • 对不起,我错了。我正在写 Web Service Provider。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-09-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-11-07
相关资源
最近更新 更多