Skip to main content

Posts

Showing posts from April, 2013

A Java Core Service Client for SDL Tridion 2013

Since SDL Tridion 2013 is out for a few weeks, I thought I should upgrade the previous Core Service Java client to the latest Tridion version. The JAR distributable [direct link] for Core Service client SDL Tridion 2013 is available here:  https://code.google.com/p/yet-another-tridion-blog/source/browse/trunk/Core+Service+Java+Client/#Core%20Service%20Java%20Client%2Fdist There are no changes in its functionality. This is a compatibility release.

Intercepting Core Service traffic with Fiddler

Fiddler2 is a proxy that runs locally on your machine and stays in-between a client (i.e. typically your browser) and the remote server. It can this way intercept the communication between the two and display it in various formats. So, in order to intercept communication with the Core Service, one should configure their Core Service client application to use the Fiddler proxy. The proxy installs itself on your local machine (when Fiddler starts), and on port 8888. Intercepted communication shows up in Fiddler somewhat like this: So, how do I specify a proxy in my client application? That depends on the technology used. Java Core Service Clients There are several ways of doing this, but the idea is that we need to set two properties: http.proxyHost - the host name or IP of the proxy server (i.e. localhost for Fiddler); http.proxyPort - the port the proxy is listening to (i.e. 8888  for Fiddler); If you have access to the code, you can set them using the System.se

Streamlining the Core Service Java Client

In a previous post ( http://yatb.mitza.net/2012/12/a-core-service-java-client.html ), I was presenting the Java client for Core Service. In this post, I decided to post the distributable JAR on my Google Code project page. You can find the JAR distributable  [direct link]  for Core Service Java client for Tridion 2011 SP1 HR1 at the following URL:  https://code.google.com/p/yet-another-tridion-blog/source/browse/trunk/Core+Service+Java+Client/#Core%20Service%20Java%20Client%2Fdist The only new feature of this distribution is the CoreServiceFactory class in package mitza.coreservice.client , which allows you to easily obtain a Core Service client object. The following methods are exposed: getBasicHttpClient() - Get the singleton CoreService client for the BasicHttp endpoint; getService()  - Get the singleton  CoreService2011  service object. This method is used internally by the  get*Client  methods. The logic uses a WSDL local to the JAR rather than connecting and downloading t