DocumentObj25.Create API not working

Hi,

I'm trying to create a customized utility that will do a find and replace in the CMS.

So, i used fiddler to sniff on the requests that publication manager is doing and try it on my prototype.

Everything is working great until the part where i will create a new version of a topic,

It returns this error: [-206] The processing-instruction contains invalid information: version 4. [206;InvalidProcessingInstruction]

Here is the signature of the API:

public CreateRequest(long folderRef, string ishType, string logicalId, string version, string language, string resolution, string xmlMetadata, string edt, byte[] data);

Here are the values that i passed:

> FolderRef = -1 (Since i'm just creating a new version of the topic)

> IshType   = ISHModule

> LogicalId = GUID-55DAB7FB-26E8-422C-82F6-AC439AEF46F6

> Version   = 4 (According to the documentation i can pass "NEW", but i'm still getting the same error)

> Language  = VLANGUAGEEN

> Resolution = "" (blank)

> Edt       = EDTXML

> data      = The byte repesentation of the data

> XMLMetaData = 

<ishfields>
    <ishfield name="FTITLE" level="logical">FindReplace1</ishfield>
    <ishfield name="FMODULETYPE" level="logical" ishvaluetype="element">VMODULETYPETOPIC</ishfield>
    <ishfield name="FDESCRIPTION" level="logical" />
    <ishfield name="FNOTRANSLATIONMGMT" level="logical">No</ishfield>
    <ishfield name="FREQUESTEDLANGUAGES" level="logical" ishvaluetype="element" />
    <ishfield name="FCHANGES" level="version">Test</ishfield>
    <ishfield name="FISHRELEASECANDIDATE" level="version" ishvaluetype="element" />
    <ishfield name="DOC-LANGUAGE" level="lng">en-US</ishfield>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSTOBETRANSLATED</ishfield>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="element">VUSERMYNAME</ishfield>
    <ishfield name="FREVIEWER" level="lng" ishvaluetype="element" />
    <ishfield name="FTRANSLATOR" level="lng" ishvaluetype="element" />
    <ishfield name="FCOMMENTS" level="lng" />
    <ishfield name="FATMELBTCOMMENT" level="lng" />
    <ishfield name="FATMELMODULE" level="version" ishvaluetype="element" />
    <ishfield name="FATMELSRCREV" level="version" />
</ishfields>

I've already read the documentation about this error and it somehow does not help me.

Thanks,

Nikku

Parents
  • Thanks for the elaborate information Nikku, appreciated!

    The one thing missing to solve "[-206] The processing-instruction contains invalid information: version 4. [206;InvalidProcessingInstruction]" is actually the blob (so xml file in this case) that you are trying to submit.

    Inside that xml file you'll find something like
    <?ish ishref="GUID-8785F7BA-A2A3-482F-AD97-9815C7D22CC9" version="4" lang="en"?>
    This is an xml processing instruction which the CMS uses to avoid manual errors on submitting the wrong file in the wrong location (like LogicalID, version and language). Think about manual scenarios, but also about roundtripping translated content.

    So what you should do is either remove the <?ish ... ?> content in total, or make its values (probably version 4) match with your Create action.
Reply
  • Thanks for the elaborate information Nikku, appreciated!

    The one thing missing to solve "[-206] The processing-instruction contains invalid information: version 4. [206;InvalidProcessingInstruction]" is actually the blob (so xml file in this case) that you are trying to submit.

    Inside that xml file you'll find something like
    <?ish ishref="GUID-8785F7BA-A2A3-482F-AD97-9815C7D22CC9" version="4" lang="en"?>
    This is an xml processing instruction which the CMS uses to avoid manual errors on submitting the wrong file in the wrong location (like LogicalID, version and language). Think about manual scenarios, but also about roundtripping translated content.

    So what you should do is either remove the <?ish ... ?> content in total, or make its values (probably version 4) match with your Create action.
Children