如何设置Web服务方法以接受SOAP操作中的参数? [英] How can I setup web service method to accept parameters in the SOAP action?

查看:79
本文介绍了如何设置Web服务方法以接受SOAP操作中的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个主题是我用语言最好的解释,但让我告诉你我的意思。

Well the subject is my best desciption in words, but let me show you what I mean.

 <soap:Body>
  <HelloWorld Version="1" />
 </soap:Body>

 我需要能够接受上面示例中的soap body。但我无法看到我的代码中的web方法必须如何才能实现。有什么建议吗?

 I need to be able to accept the soap body in the example above. But I cant see how my webmethod in my code must look like for this to work. Any suggestions?

-

Werner

--
Werner

推荐答案

总而言之,您发布的内容与SOAP Action标头无关。

First of all, what you posted has nothing to do with the SOAP Action header.

其次,作为实验,尝试定义您的Web方法以接受XmlElement类型的单个参数。发送您发布的XML,然后检查XmlElement以查看您获得的内容。

Second, as an experiment, try defining your web method to accept a single parameter of type XmlElement. Send the XML you posted, then examing the XmlElement to see what you get.

 


这篇关于如何设置Web服务方法以接受SOAP操作中的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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