0

So i'm having a weird issue with my service reference in my VS2010 project that i can't really figure out.

Any time i rebuild the soap service that the service reference is attached to i can no longer deserialize the data from one of the methods. All of the other methods work but one in particular just gets filled with null/default values instead of the correct values. I can confirm that the web service is still returning good data and looks to be in the correct format. Once i update the service reference it all works again until i rebuild.

When i go and look at the diff of the structure i see that the following files are now different:

  • Configuration.svcinfo
  • Configuration91.svcinfo
  • Reference.cs
  • Reference.svcmap
  • MyService.disco
  • MyService.wsdl

When i look in the wsdl it looks almost like the fields were re-ordered. But i don't see how that is possible.

Here is the header information for my web service

[WebService(Namespace = http://myservice/)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[Policy("ServerPolicy")]

Anyone know why this is happening with each rebuild?

EDIT: Here is an example.

For example here is a random change that was made, this class was not changed but only recompiled:

Before:

/// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Order=0)]
    public string Userid {
        get {
            return this.useridField;
        }
        set {
            this.useridField = value;
            this.RaisePropertyChanged("Userid");
        }
    }

After:

/// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Order=2)]
    public string Userid {
        get {
            return this.useridField;
        }
        set {
            this.useridField = value;
            this.RaisePropertyChanged("Userid");
        }
    }
John Saunders
  • 160,644
  • 26
  • 247
  • 397
Chris Rice
  • 728
  • 2
  • 9
  • 32

0 Answers0