0

I need to access the dynamic broker content through a web service call for html5 based mobile website. we are on SDL 2011 version build:6.1.0.55920.

  1. Is broker content already available as a web service?
  2. Is there any configuration setup that needs to be done ?

Can anyone provide the guidelines needed.

Thanks in advance.

Huston Lopes
  • 622
  • 4
  • 17

2 Answers2

1

There is a Content Delivery OData web service that can be used to retrieve dynamic content from the Broker. To install it check the docs at the following locations:

.Net installation: http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_3E3A2FB1B4E34C20934B5A841C2E0930 (login needed)
Java installation: http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_DC046ED58691440E92ED1A8672851427 (login needed)

This information is also provided in the Installation Guide PDF.

For information regarding implementing the service check the docs at http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/concept_DFBA3FF3977045F892ABB4FCF8DA38B1

Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20
  • Hi Jeremy, I started with a console app to retrieve the component data. CDS.ContentDeliveryService cds = new CDS.ContentDeliveryService(new Uri("http://XXXXX/odata.svc")); var comp = from cp in cds.Components where cp.ItemId == 12202 && cp.PublicationId == 12 select cp; foreach (var xx in comp) { Console.WriteLine(xx.Title); } Console.Read(); – user1729917 Oct 15 '12 at 17:23
  • How to retrieve the metadata of the component?? i am getting a namespcae error when tried using ComponentPresentationAssembler CPA = new ComponentPresentationAssembler(); string sComponentXML = CPA.GetContent(result, genericCT); is there any other approach to fetch the metadata from the broker DB? – user1729917 Oct 15 '12 at 17:29
  • When using OData you don't need to use ComponentPresentationAssembler - that's kind of the point of having the webservice ;) All the information is available through the responses provided by the service. There's some useful info at http://sdltridionworld.com/articles/sdltridion2011/tutorials/using-odata-with-tridion-and-net.aspx – Jeremy Grand-Scrutton Oct 16 '12 at 08:15
  • I have gone through the above tutorials but i am getting limited data(component info) like Title, published date etc,I am not getting the actual component xml data. I am not sure whether i missed any configuration settings on the content delivery end. Any help would be highly appreciated. – user1729917 Oct 16 '12 at 23:35
  • I don't think the Component XML is available. You can get Component Presentation content though, so if you need the XML then you need to have a CT that publishes it. – Jeremy Grand-Scrutton Oct 17 '12 at 08:24
0

First you need to modify the cd_storage_confe.xml file for querying the broker database. This file is present in bin\config folder of website.

Enable this tag:

<SearchFilter Name="SearchFilter" Class="com.tridion.broker.components.meta.MsSqlSearchFilterHome" defaultStorageId="defaultdb"/>

After this, you can use the Broker query mechanism to fetch the content from broker database and display the data dynamically.

More help on SdlLive website (login required)

Huston Lopes
  • 622
  • 4
  • 17