Web Services - Non-Soap and Soap - How?
Posted on 2009-04-23
I have worked with several commercial APIs and WebServices. Just about all of them are designed for novice programmers to be able to use. As such, most of the services accept Non-Soap messages, Plain XML, and/or Name Value Pairs.
The following companies I have integrated with recently have Non-Soap services: FedEx (soap and non-soap), Google (plain xml), eBay (plain xml and soap), UPS (plain xml), PayPal (name value pair and plain xml)
I have been studying ASP.NET web services and they are all geared for SOAP. I want to accept soap, but also want to accept plain XML or name value pairs.
ASP.NET allows you to accept name value pairs in HTTP-POST or HTTP-GET, but if you do that you cannot handle error messages. ASP.NET web services only handle errors when SOAP is used. When I use POST with an incorrect parameter I get a big server error.
Another problem I found with ASP.NET web services is that the XML posted must include every parameter or there will be a big old server error.
When I use FedEx and Google I can leave out any optional parameter in my XML.
So here are my questions:
- what technology will allow me to create a service like the many Non-Soap commercial services I just described?
- Is .NET capable of accepting plain xml and outputing plain xml in a web service?
- Is .NET capable of handling error messages that occur globally, such as when you leave out a parameter?
Summary: I want to build a web service that works like the commerical services I am familiar with. However, .NET seems very rigid and locked into SOAP protocals. There does not appear to be a way to handle errors, use plain xml, or accept conditional xml elements.
Anyone have any advice for me about how to create the type of service I want?