Generally speaking, Java and .NET developers often choose the SOAP interface to talk to CMS. SOAP toolkits handle most of the protocol details for you allowing you to focus more on writing your code and not worrying about the communication with the server.
However, there are times when using REST is to your advantage. SOAP toolkits impose some overhead in terms of memory usage and initialization time, whereas in REST you can keep your requests streamlined and only consume the part of the response you're interested in, but you have to manage the parsing and communication yourself. You can even mix and match REST and SOAP as in this example, where I use the CMS REST API to answer the prompts for a report and then use the Cognos SDK to retrieve the PDF output.
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Please enter a value for quantity:
Please enter a search term for Product:
1) Astro Pilot 151110
2) Astro Pilot 151120
3) Astro Pilot 151130
Sample code and deployment is here. You will need to include the cognos SDK jars in your classpath to run this sample
Using REST in Java
KCamp 27000108YJ 1 Comment 5,253 Views