HTTP POST与HTTP SOAP [英] HTTP POST vs HTTP SOAP

查看:148
本文介绍了HTTP POST与HTTP SOAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用基于asmx的Web服务使用2.0框架。

通过创建对web服务的引用,asp.net Web客户端可以使用Web服务。这是使用HTPP post协议。



但是,我想知道如何使用HTTP肥皂协议,这是我必须将对象发送到Web服务器时所需的。



另外我们何时使用wsdl实用程序在客户端生成代理类。

I have asmx based web service using 2.0 framework.
The web service can be consumed by the asp.net web client by creating the reference to web service.This is using HTPP post protocol.

However , i would like to know how do I use HTTP soap protocol which is required when i have to send objects to the web server.

Also when to we use the wsdl utility to generated the proxy class at the client end.

推荐答案

我可以建议你获取有关如何使用Web服务的基础知识的简短快速教程? 这篇CP文章 [ ^ ]也应该有所帮助。



但是,为了回答您的问题,当您向asp.net项目添加Web引用时,它已经创建了代理类并且它使用了WSDL。作为服务的使用者,您需要关注的是调用服务并根据合同和获取响应提供适当的参数。



我希望它有所帮助。



[请接受/投票给你的答案或解决方案,以鼓励他人]
Hi, may I suggest you pick up a short and quick tutorial on the basics of how to consume a web service? This CP article[^] should help too.

However, to answer your questions, when you add web reference to your asp.net project it already creates proxy classed and it uses the WSDL. As a consumer of the service all you need to care about is invoke the service and provide proper parameters as per the contracts and fetch response.

I hope it helps.

[Please accept/up-vote answers or solutions that work for you to encourage others]


一个.net webservice in 2.0已经使用SOAP进行通信。使用它时无需更改。

也可以在没有任何特殊要求的情况下将对象发送到服务器。如果在Visual Studio中添加对Web服务的引用,它将创建WebService Client包装器,并且还应该为服务接受的对象创建所需的类。

尽管如此,在发送对象时必须小心,它们必须是XML可序列化的。
A .net webservice in 2.0 already uses SOAP for communication. You do not need to change something when using it.
Sending objects to the server should also be possible without any special requirements. If you add a reference to the webservice in Visual Studio it will create the WebService Client wrapper and should also create the needed classes for the objects the service is accepting.
Nevertheless you have to take care when sending objects, that they have to be XML serializable.


这篇关于HTTP POST与HTTP SOAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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