How to control the ImportXML method if it's finished
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > How to control the ImportXML method if it's finished




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to control the ImportXML method if it's finished  
Fernando Possebon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-07-04 10:49 PM

Hi guys,

We're developing a routine that does a replication of a catalog to other
stores. Basically we are exporting a "main" catalog, changing their names
(each one to a specific store). Each catalog is created in a separated XML
file.

When we try to import them in a sequence, we have some problems: the first
catalog works fine, but others seems to be messed, the categories are not th
e
same way that the first one, or either the "main" catalog.

We're suspecting that this is caused because we are importing one after
other, without waiting to finish, that's where I need a help.

How can I control the status of a ImportXML method programatically? Using
BizDesk, I have to look at Event Viewer.

I'm using Microsoft.CatalogServer.CatalogContext.ImportXML method. Any help
on this issue will be very appreciated.

Best regards and thanks in advance.

Fernando Possebon





[ Post a follow-up to this message ]



    RE: How to control the ImportXML method if it's finished  
Vinayak Tadas[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-17-04 10:50 PM

Check the sample in the cs2002_agentapi.chm  file
// Importing an XML file
XmlImportOptions xmlImportOptions = new XmlImportOptions();
xmlImportOptions.FileName = @"file path";
xmlImportOptions.Mode = CatalogImportMode.Full;
int operationId = catalogContext.ImportXml(xmlImportOptions);
while( catalogContext.GetImportProgress(operationId).Status ==
CatalogOperationsStatus.InProgress)
{
// The import is in progress so add some sleep here before chcecking
the status again
System.Threading.Thread.Sleep(5000);
}

See the methods CatalogContext.ImportXml and
CatalogContext.GetImportProgress for determining the status of the import
operation


--------------------
Thread-Topic: How to control the ImportXML method if it's finished
thread-index: AcR8twccxX7Lm15+SpmfnlDVn+jCAg==
X-WBNR-Posting-Host: 200.248.206.130
From: "examnotes" <Fernando
Possebon@discussions.microsoft.com>
Subject: How to control the ImportXML method if it's finished
Date: Sat, 7 Aug 2004 12:45:01 -0700
Lines: 23
Message-ID: <F401B6CB-DF29-452C-A000-A3347BEFBD93@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14460
X-Tomcat-NG: microsoft.public.commerceserver.general

Hi guys,

We're developing a routine that does a replication of a catalog to other
stores. Basically we are exporting a "main" catalog, changing their names
(each one to a specific store). Each catalog is created in a separated XML
file.

When we try to import them in a sequence, we have some problems: the first
catalog works fine, but others seems to be messed, the categories are not
the
same way that the first one, or either the "main" catalog.

We're suspecting that this is caused because we are importing one after
other, without waiting to finish, that's where I need a help.

How can I control the status of a ImportXML method programatically? Using
BizDesk, I have to look at Event Viewer.

I'm using Microsoft.CatalogServer.CatalogContext.ImportXML method. Any help
on this issue will be very appreciated.

Best regards and thanks in advance.

Fernando Possebon


Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure!  For more info visit http://www.microsoft.com/security.  Please
reply to the newsgroups only.  Thanks






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:55 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register