WSO2小工具无法访问SOAP有效负载

时间:2012-03-08 17:40:20

标签: wso2 soapui wso2stratos

我创建了一个数据服务,通过TryIt和SoapUI正确测试。但是,当我尝试将其包含在Gadget中时,我总是会收到此错误:

  

“将SOAP有效内容中继到终点时发生错误   https://data.stratoslive.wso2.com/services/t/inova8.com/ProductVendorDataService.SOAP11Endpoint/”   小工具包含此片段:function doSOAPCall(){var endpoint   =“https://data.stratoslive.wso2.com/services/t/inova8.com/ProductVendorDataService.SOAP11Endpoint/”; var payload =“”; var operation =“urn:getproduct”;   document.getElementById(“response-disp”)。innerHTML =   wso2.io.makeSOAPRequest(端点,操作,有效负载); }

数据服务基于示例http://wso2.org/library/tutorials/2011/11/expose-your-cloud-data-as-rdf-data-model。请注意,该操作不需要参数,但我已经尝试了有效负载的每个变体而没有成功。

1 个答案:

答案 0 :(得分:1)

我尝试了您的步骤,发现您的小工具代码段存在两个问题,无法进行SOAP调用。

首先,由于您从数据服务端点访问的操作,不需要任何有效负载传递给它。因此,在小工具xml中,您必须将有效负载设置为'null'[NOT payload =“” ]

第二个问题是,你在小工具xml中定义的操作名称是不正确的。一旦我通过try-it选项尝试了你的数据服务,我发现你的访问操作名称是“_getProduct”,它不是“getProduct”。

一旦纠正了上述两个问题,SOAP小工具可以很好地处理您的终点并能够从您的访问操作中获得对小工具的响应.doSOAPCall()函数的更正代码段如下所示。

function doSOAPCall(){var endpoint =“https://data.stratoslive.wso2.com/services/t/inova8.com/ProductVendorDataService.SOAP11Endpoint/”; var payload = null; var operation =“urn:_getproduct”; document.getElementById(“response-disp”)。innerHTML = wso2.io.makeSOAPRequest(endpoint,operation,payload); }

感谢;

Lalaji