Error: possible soap version mismatch

Sometime you may encounter below mentioned error when you try to access web service in your .net application.

Possible SOAP version mismatch: Envelope namespace was unexpected. Expecting

Actually if you are setting URL property in your .net application with wrong web service url than most likely you may get this error. The general mistake is that people assign same url which they used to see the description of web service (e.g. http://localhost/servlet/webservices?ver=1.1?wsdl) to the URL property of the proxy class instead of the web service url(e.g. http://localhost/servlet/webservices?ver=1.1). So assign the web service url and see if you are able to resolve this error.
If still you are not able to resolve this error then make sure the url you are assigning is correct.

Note: - I have noticed that in case web service is developed in .Net and is consumed by a .Net client then assigning description url (e.g. http://localhost/webservices/service.asmx?wsdl) does not generate this error. But if the web service is developed with non .net technology and generates WSDL that is somewhat different from what .Net clients expect then this error will most likely come up in that case try above given solution.

1 comment:

Unknown said...

i have tried as you mentioned but still iam getting the error as follows:

mismatched tag at line 68, column 16, byte 3162 at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/ line 187

what shell i do?