0

So I am currently running into a weird situation where my web service WSDL and server specifies two parameters but when I add the web service as a reference in my project. Visual studios creates a reference.cs page that says I need three parameters. I've used soap UI to confirm that the web service does indeed only request two parameters.

Anyone else run into this problem?

I have to manually change the reference.cs to only take two parameters so my code will compile and I can use the WS correctly. Ive checked all the other web services which run just fine and do not have this problem. only this one service.

here is a pic from the wsdl enter image description here here is a pic from the reference page enter image description here

Tyler Buchanan
  • 311
  • 1
  • 4
  • 18
  • You are unlikely to get any useful answers to this question the way you are asking it now. Consider to provide some **short** sample that reproduces problem. Note that your title mentions VB (assuming VisualBasic.Net) but text says "reference.cs", please confirm that compact framework is important part (check if the same happens in regular .Net project). – Alexei Levenkov Aug 22 '13 at 17:20

1 Answers1

0

Most probably you added your web service as a web reference instead of a service reference. When using this type of references with wcf services, sometimes you find that your service methods change from

mymethod(string param1, bool param2)

to

mymethod(string param1, bool param2, bool hasParam2)

Or something very similar. Right? Just remove the reference and add it again as a service reference.

In case you did that to spare web.config changes and endpoints, just remember changing the url property of your service in other enviroments. Because is hardcoded in the reference and you may not know it!

Gonzix
  • 1,136
  • 5
  • 8
  • I went to my vb and I cannot find an Add Service Reference anywhere.. using VB 2008 CF 3.5. Only has Add Web Reference. – Tyler Buchanan Aug 22 '13 at 19:34
  • Oh I see, then you have to use web reference and deal with the extra parameters. Sorry! Check this http://stackoverflow.com/questions/997545/why-are-there-extra-arguments-in-my-wcf-web-service-reference – Gonzix Aug 22 '13 at 20:17