开发者

create vb project for consuming XML Web Service

I need to implement a project that will consume XML Web Service from other company. A user will retrieve data from this application. They provide a interface layout for the web service with all the functions.

Here I am to trying to create a project with VS2010 as VB project. This application will co开发者_高级运维nstantly pull data from the XML web service to sync with the latest data from their server.

I am confusing what types of project that I have to create and add for this whole solution with VS2010. I was thinking create a VB windows form application project first and add WCF service application to this solution.

Please, suggest me to have a right choice. Thanks.

<---Edit-----> When the data is pulled from the web service and it will be saved in SQL server on our side. When it is updated it will be updated in our SQL server and to their server thru XML Web Service.


If you are a consumer of a web API, there is no particular project type needed. If you want this to fire off over and over again, without intervention, you are restricted to a project type that can either a) work as a service or b) work as a simple executable that can be scheduled.

The easiest is the console application, sans the console window. You simply set up an executable that fires off the service call(s) and schedule with windows scheduler. A better solution, but more time consuming to create and test, is a windows service.

As far as setting up the service API in your application, you will need to get the WSDL from the client. Use this WSDL to create your proxy.

NOTE: If you are not setting up your own service, you do not need a WCF service project to consume someone else's service.


Right click on any of your projects where you want to reference your webservice. Look for "Add Service Reference" (VS2010), input the url to the WSDL or just the asmx page and you're done!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜