How to use SOAP in asp.net mvc

前端 未结 3 1402
谎友^
谎友^ 2020-12-19 11:26

A 3rd party site sends its notifications after my web application has completed some action in order to notify me of its success. Receiving a notification item requires a re

相关标签:
3条回答
  • 2020-12-19 11:35

    If I remember correctly SOAP is basically xml requests and responses. You might want to look into WSDL (Web Service Definition Language) to avoid having to deal with raw data, and you would likely find a great deal of tutorials on wsdl as well.

    0 讨论(0)
  • 2020-12-19 11:39

    You need to learn a little about WCF. See the WCF Developer Center, especially the Beginners Guide.

    What you want is to create a simple WCF service that corresponds to the WSDL that they will give you. You will need to implement only the operation (method) that they will call to notify you. You can host a WCF service in IIS along with the rest of your application.

    The issue will be how to correlate the notifications with the page you're on in your MVC application.

    0 讨论(0)
  • 2020-12-19 12:01

    I don't think this is specific to ASP.NET MVC really. If you have a WSDL for their web service, just use that to generate stub classes using either wsdl.exe or by adding a web reference to your project, then call the web service from your controller.

    0 讨论(0)
提交回复
热议问题