【发布时间】:2012-12-04 21:35:57
【问题描述】:
我正在尝试使用 CoreService 2010 Basic HTTP 接口在 Tridion 中发布单个组件。
使用 Soap UI,我正在发送
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:Publish xmlns="http://www.sdltridion.com/ContentManager/R6" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns3="http://www.sdltridion.com/Security" xmlns:ns4="http://www.sdltridion.com/ContentManager/CoreService/2010" xmlns:ns5="http://schemas.microsoft.com/2003/10/Serialization/">
<ns4:ids>
<ns2:string>tcm:292-39250</ns2:string>
</ns4:ids>
<ns4:publishInstruction>
<ResolveInstruction>
<IncludeChildPublications>true</IncludeChildPublications>
<IncludeComponentLinks>false</IncludeComponentLinks>
<IncludeWorkflow>false</IncludeWorkflow>
</ResolveInstruction>
<RenderInstruction/>
</ns4:publishInstruction>
<ns4:targets>
<ns2:string>tcm:0-5-65537</ns2:string>
</ns4:targets>
<ns4:priority>Normal</ns4:priority>
<ns4:readOptions>
<ns4:LoadFlags>None</ns4:LoadFlags>
</ns4:readOptions>
</ns4:Publish>
</S:Body>
</S:Envelope>
然后接收:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<ActivityId CorrelationId="7bfbbb48-8111-40ba-9e6e-8a7073a21a09" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
</s:Header>
<s:Body>
<PublishResponse xmlns="http://www.sdltridion.com/ContentManager/CoreService/2010">
<PublishResult xmlns:a="http://www.sdltridion.com/ContentManager/R6" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</PublishResponse>
</s:Body>
</s:Envelope>
我希望在这里看到一个 PublicationTransaction,我做错了什么?
我的请求基于此 url http://blog.building-blocks.com/publishing-components-using-the-core-service-in-sdl-tridion-2011,看来我不需要更多,但也许我遗漏了一些东西。
【问题讨论】:
-
你的项目进入发布队列了吗?
-
我还没有让 SoapUI 工作,但我怀疑你的
<ns4:LoadFlags>None</ns4:LoadFlags>可能与没有得到更有用的东西有关。项目是否按照 Chris 的要求进入发布队列? -
@Tommy:你有什么收获吗?
-
抱歉,我今天大部分时间都无法上网。但是不,该项目不会进入发布队列(并且永远不会更改发布状态)。我尝试在请求中注释掉 readOptions,但得到相同的结果。对于 SoapUI,我使用 4.5.0 版本,4.5.1 中有一个记录在案的错误,因此它不适用于 Tridion(以及以相同方式访问的服务)
-
好的,现在我得到一个发布事务,我尝试在 Web UI 中发布并使用 Fiddler 跟踪它,我注意到它在 json 请求中发送 tcm:0-5-66538。所以我尝试使用它而不是“tcm:0-5-66537”。但这让我有点困惑,因为我认为“65538”是“目标类型”,而不是“发布目标”(65537)。看来这可能只是我对两者之间的区别的理解是问题所在。
标签: soap tridion tridion-2011