I have a web service that has one method:
[WebMethod]
public bool SyncUserData(string userxml)
The xml is a series of user records and I use an XmlReader to read through the data and process it.
When I call the web service with 2000 records, it processes 2000 records. When my client calls it with the same xml, it processes 1000 records. It processes every other record.
Does anyone have any experience with this sort of problem? My thought is that it is an encoding issue but I have tried sending the data to the service as ASCII, ISO-8859-1 etc in my tests and cannot recreate.
Any help much appreciated.
This is the calling code:
while (userXml.Read())
{
if (userXml.Name == NODE_NAME_FILE_NAME && userXml.NodeType == XmlNodeType.Element)
{
_importFilename = userXml.ReadString();
}
if (userXml.Name == NODE_NAME_USER && userXml.NodeType == XmlNodeType.Element)
{
ProcessUser(userXml);
}
}
and this is what processUser does with teh xml reader
private void ProcessUser(XmlReader userXml)
{
_usersinfeed++;
XmlDocument user = new XmlDocument();
user.LoadXml(userXml.ReadOuterXml());
...
}