简体   繁体   中英

WCF send xml to Web Service and receive message

Please tell me, can i accomplished something like.. Some company has created CRM, this CRM provides some Web Services. I can communicate with this services via XML. So my question is can i create Windows Services with WCF which will be send some request ( every hour ) to Web Service and receive data from this web services.

Example:

  1. At 9am, 10 am... WCF has sent request ( XML ) to Web Service:Hey CRM how many users you have?
  2. Web Service received a message and response via XML: I got 10 users.
  3. WCF received message: I got 10 users... and did something with it.

Please for some help. Articles, code sample, or key words what should i look for.

nothing in your question indicates the need for WCF, it sounds like all you need to do is create a SOAP reference (web reference) to this CRM Web Service and call it every hour. This could be a console app or any app for that matter.

If the provided web services are standard, WCF should be able to communicate with them. Add a service reference, specify the URL, and if discovery (WSDL) is available, Visual Studio will allow you to quickly generate a proxy class that makes using the server very easy.

Scheduling the requests every hour is not related to wcf, use task scheduler or a manual solution for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM