How do I create a web service (microsoft) that can be used by multiple endpoints?

My company plans to implement a solution in several applications that will help validate postal addresses at the time of data entry. We use the UPS Extended Address Validation (XAV) web service API to validate addresses.

Our current plan is to create a .NET web service that can be used to communicate between our applications and the UPS API. We have applications in VB6, classic ASP and .NET 2.0, so we would like to implement a solution that can be easily used by each of these software environments.

What are our (Microsoft) options for developing a web service that can be used by multiple clients? In particular, is there a way to create a single web service that can respond with JSON (in case we want to validate our web page with javascript) in addition to XML?

I'm new to web service development and want to make sure we go through all of our options. I've heard terms like asmx, WCF, OData, etc., but I don't know which framework will support what we are trying to do and where to start.

+2


a source to share


3 answers


I would recommend considering their implementation as WCF services. You can specify multiple bindings to make calls, including HTTP, TCP, MSMQ, etc., all of which can be achieved via configuration.

Creating a proxy class for use in .NET is really trivial (using svcutil.exe ) and should give you some idea of ​​what should be implemented in another language. You should be able to use the .NET proxy class in VB6 or classic ASP (vbscript) using COM interop (I haven't tried with WCF, but it should work just like any other interoperability scenario), soap tooling, or XMLHttpRequest object. Take a look at this introductory article on the topic .



You need at least .NET 3.0 to use WCF, but the flexibility over XML services (asmx) is more than worth it.

+1


a source


You will probably want to build the service in WCF and then expose it using the appropriate "bindings". You might need more than 1 bind-config, but that's where WCF starts to pay.



Having said that, I'm not sure how to bundle VB6. Does it have Webservice libs?

+1


a source


The best way to use a web service from VB6 is to create a .NET class that accesses the service and then exposes that class as a COM object. Then VB6 can use the COM object.

+1


a source







All Articles