且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何确定有效的 SoapAction?

更新时间:2023-11-27 13:33:40

通过查看服务的 WSDL,您可以看到您正在调用的服务操作期望的 SoapAction.对于 .NET 服务,您可以通过在 Web 浏览器中打开服务的 URL 并在末尾附加 ?wsdl 来访问 WSDL.

You can see the SoapAction that the service operation you're calling expects by looking at the WSDL for the service. For .NET services, you can access the WSDL by opening a web browser to the url of the service and appending ?wsdl on the end.

在 WSDL 文档中,您可以看到在操作"节点下(在绑定"下)定义的 SoapActions.例如:

Inside the WSDL document, you can see the SoapActions defined under the 'Operation' nodes (under 'Bindings'). For example:

<wsdl:operation name="Execute">
  <soap:operation soapAction="http://tempuri.org/Execute" style="document" />

找到您尝试调用的操作的操作节点,您会在那里找到它期望的 Soap Action.

Find the operation node for the operation you're trying to invoke, and you'll find the Soap Action it expects there.