Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,

I have added a web service as my service reference in .Net project. I am able to access the class and I am getting the function exposed in Web service.

The issue is when I try to call the function it says there is a version miss match. Please get a solution to fix the issue

C#
{"Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/."}
Posted
Updated 2-Nov-13 2:32am
v3
Comments
Sampath Lokuge 2-Nov-13 8:25am    
Can we have whole error message ?
Ameen Sherif 2-Nov-13 8:29am    
The Error Message

{"Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/."}
Sampath Lokuge 2-Nov-13 8:31am    
Plz check my answer.

1 solution

The problem is that you are setting the URL property of the webservice to the WSDL url. You need to set the URL of the webservice instance to the location of the webservice itself, which is something that is contained within the WSDL. To find this URL, open the WSDL document in a text editor and look for the "location" attribute of the <soap:address xmlns:soap="#unknown"> element. You can and should still use the WSDL url for graphical tools within visual studio, but it's important to make the distinction at run-time.

For more info : Possible SOAP version mismatch

Another useful link : Possible SOAP version mismatch

I hope this will help to you.
 
Share this answer
 
v2
Comments
Ameen Sherif 2-Nov-13 9:09am    
I have tried, ie I changed the URL to the location where the web service is located. Still the same issue
Sampath Lokuge 2-Nov-13 9:13am    
Have you tried the 2nd link ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900