更新时间:2022-03-11 GMT+08:00
分享

SoapClient类说明

路径

com.roma.apic.livedata.client.v1.SoapClient

使用示例

importClass(com.roma.apic.livedata.client.v1.SoapClient);
importClass(com.roma.apic.livedata.config.v1.SoapConfig);
importClass(com.roma.apic.livedata.common.v1.XmlUtils);

function execute(data) {
    var soap = new SoapConfig();
    soap.setUrl("http://test.webservice.com/ws");
    soap.setNamespace("http://spring.io/guides/gs-producing-web-service");
    soap.setOperation("getCountryRequest");

    soap.setNamespacePrefix("ser");
    soap.setBodyPrefix("ser");
    soap.setEnvelopePrefix("soapenv");
    var content = {
        "getCountryRequest": {
            "ser:name": "Spain"
        },
    };
    soap.setContent(content);

    var client = new SoapClient(soap);
    var result = client.execute();
    var body = result.getBody();

    return XmlUtils.toJson(body);
}

构造器详情

SoapClient(SoapConfig soapCfg)

public SoapClient(SoapConfig soapCfg):

方法列表

返回类型

方法和说明

okhttp3.Response

request(HttpConfig config)

用于发送rest请求

分享:

    相关文档

    相关产品

close