webservice to WCF
we had developed a webservice in vb.net,framework 2.0. We would need to rewrite this websevice in WCF with framework 3.5. Ple开发者_运维技巧ase provide some guidance regarding this and also there are many othersystems consuming our webservice url. Will this conversion have impact on the source system or does it involve any build activity for the source system to consume the url that will be developed with WCF method? Please provide sample example to have better understanding on this. Thanks!
A few thoughts.
Case 1: Your webservice is having consumers and you want to rewrite only the service and not disturb the consumers.
In this case using a basicHttpBinding end point with regular wcf service implementation would do. You can find many references to build WCF service with basicHttpBinding. Most probably this would fit your need.
Follwoing links may be helpful to you.
http://msdn.microsoft.com/en-us/library/aa480190.aspx
http://msdn.microsoft.com/en-us/library/ms731361(v=VS.90).aspx
Case 2: If You want to rewrite the service, and it is acceptable to have changes in the consumers, then it is worthy to consider the following points.
Endpoint Choice
a. If your preference is to keep your service interoperable (i.e. you would like the service to serve different platforms), Soap based endpoints would help. basicHTTPBinding, wsHTTPBinding, etc.
b. If your consumers are in the windows platform, and you prefer better performance than SOAP based bindings, netTCPBinding based endpoints would help.
c. If your consumers are in the same machine, netNamedPipe can would be a choice.
Service Design
The service design offers you to go with a lot of combination of the following.
a. Choice of deciding the service instance's life cycle.
b. Choice of Concurrency.
c. Choice of Sessions, and enforcing the order in which the service has to be called (prefered by specific designers)
d. Choice of having or not having the transactions.
You shouldn't need to change anything. It should work the same.
Have you tried migrating it yet? If so, what were the problems? If not, just switch it to 3.5 and see what happens.
The Only need is to change the service endpoints in WCF service making as
http://localhost/YourProjectName/Servicename.svc ,
Without changing the Server Side coding , You need to expose the Remote Interfaces making them as [Service Contract] and the Methods as [Data Contract] on the client Side
精彩评论