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;
开发者_如何学JAVA }
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>
So for Some reason when i was re-serialising the objects it was usign the private variables. a Quick find and replace was able to get the XML clean again.
精彩评论