从WSDL发现的SOAPAction [英] Find SOAPAction from a WSDL
问题描述
我的要求是调用于Android的Web服务,并在一个不错的方式显示结果。
My requirement is to call a web service from Android and display the result in a nice manner.
但Web服务的WSDL里面我没有找到一个的SOAPAction
。该WSDL看起来是这样的:
But inside the web service's WSDL I don't find a SOAPAction
. The WSDL looks like this:
<operation name="getStudentList">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
有没有办法找到的SOAPAction
在WSDL里面的一些其他地方吗?我可以调用Web服务,并得到一个结果,而不的SOAPAction
Is there any way to find the SOAPAction
in some other places inside the WSDL? Can I call the web service and get a result without the SOAPAction
?
推荐答案
的的SOAPAction
需要SOAP 1.1通过HTTP但很难说什么你的网页的行为服务将是,如果你不发送正确的头文件。 Web服务可能会返回一个错误,如果它是缺少的SOAPAction
(或它是否有一个意外的值),也可能什么也不做。
The SOAPAction
is required for SOAP 1.1 over HTTP but it's hard to say what the behavior of your web service will be if you don't send a proper header. The web service may return a fault if it's missing the SOAPAction
(or if it has an unexpected value) or it might do nothing at all.
的WSDL找到用于的SOAPAction
,里面的&LT价值的地方;肥皂:运转&gt;
。如果它没有为操作指定或者它就像在您发布的例子(的soapAction =
),你通常需要将它添加到请求报头:
The WSDL is the place to find the value to use for the SOAPAction
, inside the <soap:operation>
. If it's not specified for an operation or it's like in the example you posted (soapAction=""
) you normally need to add this to the request headers:
SOAPAction: ""
与空引用的字符串尝试,它应该工作。
Try with an empty quoted string and it should work.
这篇关于从WSDL发现的SOAPAction的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!