[英]asp.net mvc post to asmx web service
I apologize if this is a stupid question. 如果这是一个愚蠢的问题,我深表歉意。
In my MVC
application I have to contact an external ASMX
web service. 在我的
MVC
应用程序中,我必须联系外部ASMX
Web服务。 I haven't found the info I need to get this done. 我没有找到完成此操作所需的信息。 I want to make a
HTTP POST
request to the web service, I have the URL
and I know the Content-Type
should be application/x-www-urlencoded
. 我想向Web服务发出
HTTP POST
请求,我有URL
并且我知道Content-Type
应该是application/x-www-urlencoded
。
I am supposed to provide two parameters, SSN
and PASSWORD
. 我应该提供两个参数,
SSN
和PASSWORD
。 The response is XML
that I have to walk through and get into objects. 响应是我必须遍历并进入对象的
XML
。
Does it matter if I do this inside a controller or not? 是否在控制器内执行此操作是否重要?
Can anyone provide an example of how to: 1. create the request, 2. walk through an XML response 任何人都可以提供以下示例:1.创建请求,2.遍历XML响应
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.