Web Reference Code generator template.

Posted by Bluephlame on Stack Overflow See other posts from Stack Overflow or by Bluephlame
Published on 2010-02-23T05:04:45Z Indexed on 2010/03/14 10:55 UTC
Read the original article Hit count: 224

Filed under:
|

I Have an internal SOAP Web service that is being called from an external REST service in .NET

it works fine however I am simply passing through the SOAP objects of the REST Layer but the automatic generation of the WebReference Code in Visual Studio adds the 'field' to the end of every attribute.

basically it makes my XML look all nasty. Everything works I just want to clean up my XML.

Any ideas how i can change the template for the reference.cs or to make the XML generate nicely from the Web Service Objects.

Here is an example of the reference.cs

    public int HeadLeft {
        get {
            return this.headLeftField;
        }
        set {
            this.headLeftField = value;
        }
    }

    /// <remarks/>
    public int HeadTop {
        get {
            return this.headTopField;
        }
        set {
            this.headTopField = value;
        }
    }

    /// <remarks/>
    public int HeadWidth {
        get {
            return this.headWidthField;
        }
        set {
            this.headWidthField = value;
        }
    }

Here is an examle of the XML

<a:headHeightField>208</a:headHeightField> 
<a:headLeftField>316</a:headLeftField> 
<a:headTopField>103</a:headTopField> 
<a:headWidthField>161</a:headWidthField> 

© Stack Overflow or respective owner

Related posts about .NET

Related posts about webservice