views:

83

answers:

2

My company is planning to implement a solution in multiple applications that will help to validate mailing addresses at the point of data entry. We're using UPS's Extended Address Validation (XAV) web service API to validate the addresses.

Our current plan is to build 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'd like to implement a solution that can be easily consumed by each of these programming environments.

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

I'm new to designing web services and want to make sure we consider all of our options. I've heard terms like asmx, WCF, OData, etc., but I don't know which frameworks will support what we're trying to do and where to start.

+1  A: 

I'd recommend looking at implementing them as WCF services. You can specify multiple bindings for how to call the services, including HTTP, TCP, MSMQ, etc all of which can be achieved through configuration.

Generating the proxy class to use in .NET is really trivial (using svcutil.exe) and should give you some idea of what would be required to implement 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 the same as any other interop scenario),the soap toolkit or the XMLHttpRequest object. Take a look at this introductory article on the subject.

To use WCF, you'll need at least .NET 3.0, but the flexibility over XML web services (asmx) is more than worth it.

Russ Cam
+1  A: 

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

John Saunders