gpt4 book ai didi

android - 从 WSDL 中查找 SOAPAction

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:33:02 26 4
gpt4 key购买 nike

我的要求是从 Android 调用 Web 服务并以良好的方式显示结果。

但在 Web 服务的 WSDL 中,我没有找到 SOAPAction。 WSDL 看起来像这样:

<operation name="getStudentList">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>

有没有办法在 WSDL 的其他地方找到 SOAPAction?我可以在没有 SOAPAction 的情况下调用 Web 服务并获得结果吗?

最佳答案

SOAPAction是 SOAP 1.1 over HTTP 所必需的,但是如果您不发送正确的 header ,则很难说您的 Web 服务的行为是什么。如果缺少 SOAPAction,Web 服务可能会返回错误。 (或者如果它有一个意想不到的值)或者它可能什么都不做。

WSDL 是查找用于 SOAPAction 的值的地方, 在 <soap:operation> 里面.如果没有为操作指定它或者它就像您发布的示例 (soapAction=""),您通常需要将其添加到请求 header 中:

SOAPAction: ""

尝试使用空引号字符串,它应该可以工作。

关于android - 从 WSDL 中查找 SOAPAction,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14274644/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com