Hi there,
We are running CS2k2 FP1 and SP4. We have a .NET windows service that
picks up xml files, transforms them, and then creates / appends the
catalog via the web service. This has worked fine for months and is in
production.
Recently a file failed to load, and in the process of the failure it
stopped the whole update process, and left us with an empty catalog.
This is down to our code, and that we dont have a failover mechanism
in place right now. We're looking in to that also.
However i have investigated the reason that the failure occured. It
seems that one record in the extract is causing the issues, and more
to the point two characters in particular.
It would appear that a text field we have contains the string
'%s' (remove ' ), and this causes the entire load process to fail.
// connect to catalog webservice
CatalogServiceAgent agent = new CatalogServiceAgent(webServiceUrl,
ServiceAgent.DefaultAuthMethods);
agent.SoapProxy.Timeout = 9999000; // milliseconds
CatalogContext ctx = CatalogContext.Create(agent, new
ConsoleDebugContext(DebugMode.Debug));
// begin im****t
XmlIm****tOptions im****t = new XmlIm****tOptions();
im****t.FileName = im****tSourceFile;
im****t.Mode = (im****tType == FileExtractType.Full) ?
CatalogIm****tMode.Full : CatalogIm****tMode.Incremental;
int operationId = ctx.Im****tXml(im****t);
// wait for im****t to finish
while (ctx.GetIm****tProgress(operationId).Status ==
CatalogOperationsStatus.InProgress)
{
// The im****t is in progress so wait here before checking the status
again
Thread.Sleep(20000); // 20 seconds
}
CatalogOperationsStatus im****tResult =
ctx.GetIm****tProgress(operationId).Status;
results in a status of 'Failed'
Ive looked at the DB trace, and when compared to this record running
without the offending string there is a noticiable difference, SQL is
executing a log more commands when a successfully load happens. So it
looks like the Web Service is truncating the entire process without
providing any usefull feedback
Surely a text field can take a string like %s -> yes this could be a
placeholder value somewhere, but we've tried others such as %d and
that works fine.
Any ideas?


|