I can't find the right XML syntax of the message to pass to the business connector web service (http://website.com/BCListener/BusinessConnectorService.asmx) to unpublish a page.
The request I sent to get a publishing done is the following, and works perfectly:
<?xml version="1.0"?>
<tcmapi:Message xmlns:tcmapi="http://www.tridion.com/ContentManager/5.0/TCMAPI" version="5.0" from="robot" failOnError="false">
<tcmapi:Request ID="REQ1" preserve="false">
<tcmapi:Publish itemURI="tcm:">
<tcm:PublishInstruction xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<tcm:OnlyPublishedItems>false</tcm:OnlyPublishedItems>
<tcm:RollbackOnFailure>true</tcm:RollbackOnFailure>
<tcm:ActivateBlueprinting>false</tcm:ActivateBlueprinting>
<tcm:ActivateWorkflow>false</tcm:ActivateWorkflow>
<tcm:RenderMode>Publish</tcm:RenderMode>
<tcm:PublishTime/>
<tcm:Targets>
<tcm:TargetType xlink:href="tcm:0-2-65538" xlink:type="simple"/>
</tcm:Targets>
</tcm:PublishInstruction>
</tcmapi:Publish>
</tcmapi:Request>
</tcmapi:Message>
From what I understand of cm_tcmapi.xsd
and cm_xml.xsd
, the message to unpublish should be really similar. I've made numerous try changing the parameters, their order, adding and removing some, but nothing works.
Here's a request such as I send (I checked that the item is published, and the target type is right):
<?xml version="1.0"?>
<tcmapi:Message xmlns:tcmapi="http://www.tridion.com/ContentManager/5.0/TCMAPI" version="5.0" from="robot" failOnError="false">
<tcmapi:Request ID="REQunp" preserve="false">
<tcmapi:UnPublish itemURI="tcm:10-1045360-64">
<tcm:PublishInstruction xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<tcm:ActivateWorkflow>false</tcm:ActivateWorkflow>
<tcm:ActivateBlueprinting>false</tcm:ActivateBlueprinting>
<tcm:RollbackOnFailure>true</tcm:RollbackOnFailure>
<tcm:Targets>
<tcm:TargetType xlink:href="tcm:0-7-65538" xlink:type="simple"/>
</tcm:Targets>
</tcm:PublishInstruction>
</tcmapi:UnPublish>
</tcmapi:Request>
</tcmapi:Message>
Unfortunately, the only response I get from the webserver, instead of one giving the tcmnid of the publication transaction, is this:
<tcmapi:Message xmlns:tcmapi="http://www.tridion.com/ContentManager/5.0/TCMAPI" from="robot" version="6.0">
<tcmapi:Response ID="REQunp" success="true"></tcmapi:Response>
</tcmapi:Message>
And checking the publishing state of the object and the publishing queue confirms that nothing happened at all.