从 shell 命令调用 SOAP 请求 [英] Invoking SOAP request from shell command

查看:43
本文介绍了从 shell 命令调用 SOAP 请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 curl 向 Web 服务发送 SOAP 请求并使用 shell 脚本获取响应.请在我正在使用的命令下方找到:-

curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:" -d @sample_request.txt -X POST http://someWebServiceURL

我收到一个错误响应,显示没有 SOAPAction 标头.PFB 响应正文部分

<soapenv:故障><faultcode>Client.NoSOAPAction</faultcode><faultstring>WSWS3147E: 错误:没有 SOAPAction 标头!</faultstring></soapenv:Fault></soapenv:Body>

感谢任何帮助!

解决方案

您需要提供 SOAP 操作的名称.你有:

-H "SOAPAction:"

在那里提供操作的名称.例如

-H "SOAPAction: http://my_example/my_action"

从 WSDL 中获取操作的名称(如果有).例如,请参阅您如何确定有效的 SoapAction?..>

I using curl to send a SOAP request to a web service and get the response using shell scripting. please find below the command i am using:-

curl  -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:" -d @sample_request.txt -X POST http://someWebServiceURL

I am getting an error response which says no SOAPAction header. PFB the response body part

<soapenv:Body>
<soapenv:Fault>
<faultcode>Client.NoSOAPAction</faultcode>
<faultstring>WSWS3147E: Error: no SOAPAction header!</faultstring>
</soapenv:Fault>
</soapenv:Body>

Any help is appreciated !!

解决方案

You need to provide the name of the SOAP action. You have:

-H "SOAPAction:"

Supply the name of the action in there. E.g.

-H "SOAPAction: http://my_example/my_action"

Get the name of the action from the WSDL if you have one. E.g., see How do you determine a valid SoapAction?.

这篇关于从 shell 命令调用 SOAP 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆