I have a external vendor that provides event notification functionality to its down stream clients. They have asked us to do the following steps to implement event notification within our company to receive notifications from external vendor. I have provided actual wording in bold of event notifications as listed in the vendor web site.
In order to use our Event Notifications within a real-time integration scenario with us, you need to...
Create a service that implements our "Notification" WSDL The latest WSDL for our "Notification" service can be found within our API Documentation under the "Notification" service section. The SOAP-message that is send from Workday to your service pass along a unique identifier for the event (Event_ID) that used in the call-back to Workday to retrieve additional information for the event
I already built a WCF web service shell and crea开发者_开发问答ted a service reference to the Notification WSDL as published in the external vendor site. After that I am not sure what I need to do. The web service needs to do these two steps explained below..
- When the event occurs on external vendor side a notification message is sent out based on the end point configured on vendor side. So my web service should actively listen for these messages. Once the message is received , i will trap the event ID and make a call back to fetch more data about the data.
- Once I have the event data, I will process it as per our business logic (I am OK here)
Need help with Step 1, kinda new to building a consuming web service listening for outside events .. I have no idea where to start.
You will need to give the vendor a URL to your application - which may mean either
1) hosting on a public facing server and developing on that
2) having some sort of vpn from vendor site to yours so they can talk directly to your server
3) get your infrastructure guys to set up some rule on the firewall to allow requests from the vendor site (IP address restriction) to be routed directly to your development machine
Option 3) is my preferred option for development (simple) and then 1) for long term hosting.
I know this is old, but there is an answer. svcutil can do this for you.
svcutil.exe /language:C# /out:MyService.cs Notification.wsdl /syncOnly
This will generate most of what you need, but it also gives you the Client code which isn't required. You can delete that part from the MyService.cs file it generates. If you are using .NET 4.5, you can add /serviceContract option and it will only generate the server-specific code.
This sounds like you're writing a webservice for Workday Notifications. This wsdl uses a few enumerations which svcutil does not transfer to the generated .cs file. If you care about that, you'll need to change those string properties into enums with the range of values specified in the wsdl manually.
精彩评论