【问题标题】:JavaScript SOAP Client receives nullJavaScript SOAP 客户端收到 null
【发布时间】:2013-12-10 11:26:41
【问题描述】:

我在使用 JavaScript SOAP 客户端时遇到了一些问题。

我尝试传递以下参数:

var url = "http://mywebservice/ws";
var pl = new SOAPClientParameters();
pl.add("name1", "Hans");
pl.add("name2", "Bernd");
SOAPClient.invoke(url, "hello", pl, true, HelloWorld_callBack);

应该回答我的请求的服务器端代码如下所示:

@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name1") String txt,@WebParam(name= "name2") String strInput2)
{
    String strMethode = "hello";
    return "Hello " + txt + " and " + strInput2 + " !";
}

连接运行良好,但会打印回调方法

你好 null 和 null !

如果我在 C# 或 Java 中尝试相同的方法,它可以正常工作,我是否遗漏了什么?

【问题讨论】:

    标签: javascript soap xsd wsdl


    【解决方案1】:

    我认为您在客户行中犯了一个错误, SOAPClient.invoke(url, "hello", pl, true, HelloWorld_callBack); 检查this

    【讨论】:

      猜你喜欢
      • 2020-05-15
      • 2018-06-21
      • 2021-07-28
      • 1970-01-01
      • 2015-02-08
      • 1970-01-01
      • 2019-04-02
      • 2012-05-14
      • 2018-07-20
      相关资源
      最近更新 更多