1
votes

I have an ASP.NET MVC3 project in .NET 4 which needs to act as a SOAP server to receive notifications from another website.

I have created web services before, but I don't know how to set up a way to receive these notifications where the WSDL is provided by the external website.

I know I can create a service and get that to produce its own WSDL, but I'm assuming there must be an easy way to add a service reference, and then create a service that uses the objects/methods generated by it.

How do I do this?

Thanks

1
Why are you generating a service from an external website's WSDL? They should generate their client from your WSDL after you've built the service according to the defined spec. At any rate, to answer your question, if you add a service reference, you will have all the required methods, method signatures, and related types, so it's just a matter of converting that to a class that implements ServiceBase and implementing all of the methods.mellamokb
Sorry I don't understand. Their service already exists - perhaps I need to ask it the other way round - given an external SOAP service, how can I consume it to receive notifications?enashnash
A client doesn't typically receive notifications from a SOAP service. You would need to provide a second service for the external website to be a client and send notifications to your service. Otherwise, you need some sort of persistent duplex connection where you connect to the service at the beginning of the day, and keep the connection open waiting for any communication from the service.mellamokb
Either that or I don't understand your question...mellamokb
Ok, well it sounds like they have a pre-written client and I have to write a service that it can consume, in which case your first response seems correct. In which case, could you expand on what you mean by "converting that to a class that implements ServiceBase and implementing all of the methods"? I can create the class without a problem but how do I set that up to run as a consumable service?enashnash

1 Answers

0
votes

You can use the svcutil tool from visual studio commands line, to create the required configuration and proxy files