Sunday, September 21, 2008

Invalid Path when consuming Webservice

This will happen if you are consuming a webservice which generates xml as return value. What happens is when the webservice works correctly, it will return a well formed xml as a reply.

However, if you are using IIS to serve the webservice and when there is an error, IIS will return the error in HTML. Since the routine (proxy class) that consumes the webservice expects a well formed xml and it gets a html response (which is typically an invalid xml), it will return "Invalid Path".

Unfortunately, in most cases the error is very misleading.

No comments: