XML produced by web service call does not correspond to the service classes



I am having a problem with my web service calls in WCF. The XML produced by the we service call does not correspond to the classes defined in the Reference.cs generated by Visual Studio.


Here are the relevant parts of Reference.cs. Attributes omitted for clarity:



public partial class charterBooking : basePublicType {
private additionalCost[] additionalCostsField;
//.. lots of other properties
}

public partial class additionalCost : basePublicType {

private long additionalCostItemIDField;

private bool additionalCostItemIDFieldSpecified;

private short categoryField;

private bool categoryFieldSpecified;

private short chargeToField;

//.. lots of other properties
}


The XML produced by this call:



response = proxy.saveCharterDetails(saveCharterDetails);


looks like this (as grabbed by Fiddler):



<s:Body xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY">
<saveCharterDetails xmlns="http://ift.tt/15cLImg">
<charterEnquiry xmlns="">
<brokerCode>EX</brokerCode>
<charterBooking>
<additionalCosts>
<description>3</description>
<supplierName>2</supplierName>
</additionalCosts>
<aircraftRegistration/>
<balanceAmount>205</balanceAmount>
<!-- ...lots and lots of other xml -->
</charterBooking>
</charterEnquiry>
</saveCharterDetails>
</s:Body>


As you can see, the additionalCost in the XML does not look anything like the additionalCost in the C# entities. It should be an array for one thing!


What am I missing?


M


No comments:

Post a Comment