4

I'm just finished the configuration of XPM and testing the funcionality I've found a problem with the Update Preview function. When I use this button I get the following error:

Unable to update the changes using OData Service. Server remote error: (400) Bad request. Component: Tridion.ContentManager.Publishing.PreviewService Errorcode: 1003 User: NT AUTHORITY\Network Service StackTrace Information Details: en System.Net.HttpWebRequest.GetResponse() en System.Data.Services.Client.DataServiceContext.SaveResult.BatchRequest(Boolean replaceOnUpdate) en System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options) en Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId) en Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId) en SyncInvokePreview(Object , Object[] , Object[] ) en System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) en System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) en System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

I've configured all following this documentation: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-3C70F892-69F4-4FEE-922D-39F1AFEBD539

It means, XPM extension as a Web Service with the the next IIS configuration:

  • IP: XX.X.X.XXX
  • Port: 83

The configuration of my cd_dynamic_conf.xml file is:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="schemas/cd_dynamic_conf.xsd">
    <URLMappings>
        <StaticMappings>
            <Publications>
                <Publication Id="5">
                    <Host Domain="10.0.9.113" Port="84" Protocol="http" Path=""/>
                </Publication>
            </Publications>
        </StaticMappings>
        <StorageMapping IdentifyPublicationByProperty="publicationUrl"/>
    </URLMappings>
    <TCDLEngine>
        <Properties>
            <Property Name="prop1" Value="value1"/>
            <Property Name="prop2" Value="value2"/>
        </Properties>
    </TCDLEngine>
</Configuration>

My cd_ambient_conf.xml code is:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Configuration Version="7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd">
    <Security>        
    </Security>
  <ExcludedPaths>
  </ExcludedPaths>
  <Cartridges>
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
    <Cartridge File="footprint_cartridge_conf.xml"/>
  </Cartridges>
</Configuration>

My cd_storage_conf.xml code is:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="schemas/cd_storage_conf.xsd">
    <Global>
        <ObjectCache Enabled="false">
            <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
                <Param Name="MemSize" Value="16mb"/>
            </Policy>
            <Features>
                <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
            </Features>
        </ObjectCache>
        <Storages>
            <StorageBindings>
                <Bundle src="preview_dao_bundle.xml"/>
            </StorageBindings>
            <Wrappers>
                <Wrapper Name="SessionWrapper">
                    <Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
                        <Pool Type="jdbc" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
                        <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                            <Property Name="serverName" Value="SERVER_NAME" />
                            <Property Name="portNumber" Value="1433" />
                            <Property Name="databaseName" Value="Tridion_Broker_EM" />
                            <Property Name="user" Value="TBEMUser" />
                            <Property Name="password" Value="XXXXXXX" />
                        </DataSource>
                    </Storage>                       
                </Wrapper>
            </Wrappers>
            <Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
                <Pool Type="jdbc" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
                <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                    <Property Name="serverName" Value="SERVER_NAME" />
                    <Property Name="portNumber" Value="1433" />
                    <Property Name="databaseName" Value="Tridion_Broker" />
                    <Property Name="user" Value="TBUser" />
                    <Property Name="password" Value="XXXX" />
                </DataSource>
            </Storage>
            <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
                <Root Path="C:\Publicaciones" />
            </Storage>
            <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
                <Root Path="C:\Publicaciones\data" />
            </Storage>
        </Storages>
    </Global>
    <ItemTypes defaultStorageId="defaultDataFile" cached="false">
        <Item typeMapping="Page" cached="false" storageId="defaultFile"/>
    </ItemTypes>
</Configuration>

My publication target is configured like that:

when I call my ODataService (http://10.0.9.113:85/odata.svc/) it return me the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<service xml:base="http://10.0.9.113:85/odata.svc/" xmlns="http://www.w3.org/2007/app" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <workspace>
        <atom:title>Default</atom:title>
        <collection href="Binaries">
            <atom:title>Binaries</atom:title>
        </collection>
        <collection href="Keywords">
            <atom:title>Keywords</atom:title>
        </collection>
        <collection href="BinaryContents">
            <atom:title>BinaryContents</atom:title>
        </collection>
        <collection href="Publications">
            <atom:title>Publications</atom:title>
        </collection>
        <collection href="PageContents">
            <atom:title>PageContents</atom:title>
        </collection>
        <collection href="Templates">
            <atom:title>Templates</atom:title>
        </collection>
        <collection href="Schemas">
            <atom:title>Schemas</atom:title>
        </collection>
        <collection href="StructureGroups">
            <atom:title>StructureGroups</atom:title>
        </collection>
        <collection href="CustomMetas">
            <atom:title>CustomMetas</atom:title>
        </collection>
        <collection href="Components">
            <atom:title>Components</atom:title>
        </collection>
        <collection href="Pages">
            <atom:title>Pages</atom:title>
        </collection>
        <collection href="ComponentPresentations">
            <atom:title>ComponentPresentations</atom:title>
        </collection>
        <collection href="BinaryVariants">
            <atom:title>BinaryVariants</atom:title>
        </collection>
    </workspace>
</service>

Do you know what could be the problem? Is any configuration wrong? Thanks in advance!

4
  • How did you configure your Publication Target in CM? Commented Jul 7, 2017 at 11:58
  • I've edited my question to add tthe information you are asking. Commented Jul 7, 2017 at 12:13
  • The content delivery end point URL in the publication target should have a trailing slash '10.0.9.113:85/odata.svc'. Are you able to access the ODATA service from the CM and the Presentation servers?
    – Shiva
    Commented Jul 7, 2017 at 20:12
  • I've eddited my question with the result of call my service. Commented Jul 10, 2017 at 6:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.