首页 > 解决方案 > 使用 shell 脚本调用 tibco soap webservice

问题描述

我正在尝试使用 curl 通过 shell 脚本调用基于 TIBCO 肥皂的 Web 服务。我得到 200 ok 的响应,但没有在 response.xml 中得到输出

Tibco webservice 部署在三个实例中。我试图点击其中一个实例并检索响应,但我得到的内容长度为 0。

我尝试使用 curl 和 wget 调用 webservice 并检索响应,但内容长度为 0。

下面是 curl 命令:

    curl -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: "/ServiceImplV1.0/getInfo"/" --data @request2.xml http://sfapt-ap98t:4121/service/dataservice -o response.xml
    request2.xml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.greatclips.com/ghf/tck/service/v1.0">
    <soapenv:Header/>
    <soapenv:Body>
    <v1:GetBaseLineRequest>
    <!--Optional:-->
    <UniqueRequestIdentifier>?</UniqueRequestIdentifier>
    </v1:GetBaseLineRequest>
    </soapenv:Body>
    </soapenv:Envelope>


    Response Hostname was NOT found in DNS cache
    *   Trying 10.215.13.217...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to dlfapt-ap98a (10.215.13.217) port 6121 (#0)
    > POST /service/addataservice HTTP/1.1
    > User-Agent: curl/7.37.0
    > Host: dlfapt-ap98a:6121
    > Accept: */*
    > Content-Type: text/xml;charset=UTF-8
    > SOAPAction: /ServiceImplV1.0/getBaseLineDetails/
    > Content-Length: 323
    >
    } [data not shown] 

来自服务器的响应:

* upload completely sent off: 323 out of 323 bytes
    < HTTP/1.1 200 OK
    < Content-Length: 0
    < Date: Fri, 19 Jul 2019 17:57:45 GMT
    * Server  is not blacklisted
    < Server:
    <
    100   323    0     0  100   323      0  19383 --:--:-- --:--:-- --:--:-- 35888
    * Connection #0 to host dlfapt-ap98a left intact

标签: shellsoaptibco

解决方案


推荐阅读