locked
Web Service not fetching data after interface change RRS feed

  • Question

  • Hi Guys,

       I am using a web service for the first time after .NET 1.1 so I might have not done something right. We have a web service in an old 2.0 project which is not under development any more and we rarely do any maintenance work on it. Recently I 've had to add a couple of extra fields (a string and a decimal value) to the interface, compile and publish it. Now if I manually invoke the web service in the browser I get the right data but not when I call the web service in my code. 

     The process I am following to update is manual as I was told that the VS 2008 update reference command does not work as expected, I invoke the w3wsdl tool and copy the resulting .cs file over my existing Reference.cs, it seems to compile. Also I remove the default ctor as I have one in the partial class doing extra stuff. All seems fine and I do not get any exceptions but I also do not get data in the two new added fields.

    Any ideas or pointers as to what I could be doing wrong.

    Thanks


    Sunday, February 7, 2010 3:16 PM

Answers

  •  All right, figured it out. I was pointing to the wrong location to pick up the web service in the startup project app config. The url was set to a an old location and when I changed that to point to the same I used in the browser it works perfectly.
    • Marked as answer by tribal Monday, February 8, 2010 11:03 AM
    Monday, February 8, 2010 10:58 AM

All replies

  • Hi Tribal,

    Can you please check how you added you web service reference in your project. Add as a web References and try with that.

    Thanks
    Monday, February 8, 2010 1:58 AM

  • Thanks for replying Moidul but I would not get the generated Reference.cs file along with the vsdisco et al if I did not add it as a web reference. I am getting data for other fields but not for the newly added fields.  It may be something to do with updating the reference on the VS2008 side as it seems to work fine in the browser
    Monday, February 8, 2010 9:20 AM
  •  All right, figured it out. I was pointing to the wrong location to pick up the web service in the startup project app config. The url was set to a an old location and when I changed that to point to the same I used in the browser it works perfectly.
    • Marked as answer by tribal Monday, February 8, 2010 11:03 AM
    Monday, February 8, 2010 10:58 AM