4

I am writing a small utility to export and import items using ExportImport Service. I am using Tridion 2013 SP1.

I am able to do export the package from source tridion cme and download the package/export log to my desktop. I am able to Import the package into target cme and able to download the import log as well to my desktop.

I would like to save the Import Instruction settings in to my desktop for some of the purpose. (As we can able to do while we use the Content Porter Import wizard by clicking the save settings before import.

I see the ImportInstruction class has the property "UserMappings" is that i should use to do this? or someone can point me what class/method i should use for to save the import settings as an xml file and download to my desktop? was not able to locate the method/class from the API.

Thanks in Advance,

Jey

1

If you want to save an ImportInstruction object to an XML file, you just have to serialize the object to XML and save that to a file; you won’t find a method in the Import/Export Service API to do that for you.

For example, in PowerShell you could use ConvertTo-Xml or Export-CliXml. In a .NET application, you could use DataContractSerializer.

Note that if you send an ImportInstruction to the Import/Export Service, WCF uses a DataContractSerializer under the hood to serialize it to XML (as part of the SOAP request).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.