{"id":918,"date":"2013-06-11T20:02:22","date_gmt":"2013-06-12T02:02:22","guid":{"rendered":"http:\/\/garysamuelson.com\/blog\/?p=918"},"modified":"2018-05-28T09:50:46","modified_gmt":"2018-05-28T15:50:46","slug":"json-formatted-business-information-through-dosgi-jax-rs-rest-services","status":"publish","type":"post","link":"http:\/\/garysamuelson.com\/blog\/?p=918","title":{"rendered":"JSON Formatted Business Information through DOSGi  (JAX-RS ReST Services)"},"content":{"rendered":"<hr \/>\n<p><em><strong>Multi-part Series:<\/strong> <\/em><\/p>\n<ol>\n<li><strong> <\/strong> <a title=\"BPM Integration with OSGI: JAX-RS and JPA\" href=\"http:\/\/garysamuelson.com\/blog\/?p=774\">BPM Integration with OSGI: JAX-RS and JPA<\/a><\/li>\n<li><a title=\"JPA OSGi Bundle Delivers (Java) Business Domain Objects\" href=\"http:\/\/garysamuelson.com\/blog\/?p=799\">JPA OSGi Bundle Delivers (Java) Business Domain Objects<\/a><\/li>\n<li><em><strong>(this article) <\/strong><\/em>JSON Formatted Business Information through DOSGi (JAX-RS ReST Services)<\/li>\n<li><a title=\"BPM Service and Web-client Consumers for JSON over ReST\" href=\"http:\/\/garysamuelson.com\/blog\/?p=1038\">BPM Service and Web-client Consumers for JSON over ReST<\/a><\/li>\n<\/ol>\n<hr \/>\n<h3><strong><em>Forward<\/em><\/strong><\/h3>\n<p>This article&#8217;s focus is BPM integration with ReST services &#8211; specifically OSGi and JAX-RS. Though much of these integration details reasonably cross-over into SOAP protocols, I mainly wanted to focus on the benefits of ReST for both BPM(server) and browser-based applications.<\/p>\n<h1>JSON Formatted Business Information through DOSGi<\/h1>\n<p style=\"padding-left: 30px;\"><em><a href=\"http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-949\" title=\"Building the ReST API (JSON Messaging)\" alt=\"\" src=\"http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b.png\" width=\"363\" height=\"582\" srcset=\"http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b.png 519w, http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b-187x300.png 187w, http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b-93x150.png 93w, http:\/\/garysamuelson.com\/blog\/wp-content\/uploads\/2013\/06\/2013-06-01_11h13_40b-400x641.png 400w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><\/a>JSON-ReST API Between BPM and Business Entity Manager (Database)<\/em><\/p>\n<p>We&#8217;re trying to serve two major component requirements here:<\/p>\n<ul>\n<li><strong>Web-browser<\/strong> requires the JSON format for efficient transformation between javascript and java objects.<\/li>\n<\/ul>\n<ul>\n<li><strong>BPM Services<\/strong>, within Websphere, also require efficient access to business objects. JSON over ReST protocol being the preferred technology in support of increased agility in managing business needs (the &#8220;BPM&#8221; part of this puzzle).<\/li>\n<\/ul>\n<p>Additionally, communication-traffic must avoid unnecessary intervention as it marshals its way through system boundaries.\u00a0<strong>This means that there will be no XSLT transformations in this architecture&#8230;<\/strong> because they are no longer necessary given the ease at which APIs and JSON messages are built via JAX-RS and JAXB tools, APIs, and tooling.<\/p>\n<h2>JAX-RS and DOSGi (OSGi with CXF)<\/h2>\n<p>I again used both Eclipse (Juno) and Rational Application Developer v9-beta for these demonstrations. <strong>Only the Rational Application Developer examples demonstrate DOSGi. <\/strong>I couldn&#8217;t get DOSGi working within Websphere-Liberty.<\/p>\n<p style=\"padding-left: 30px;\"><a title=\"Eclipse (Juno) with Websphere Liberty deployment (example and tutorial)\" href=\"http:\/\/garysamuelson.com\/liberty_osgi_jaxrs_jpa_01\/[Part%203]%20Websphere%20Liberty%20Profile%20OSGi,%20JPA,%20JAX-RS,%20and%20BPM.html\"><strong>Eclipse (Juno) with Websphere Liberty deployment (example and tutorial)<\/strong><\/a><\/p>\n<p style=\"padding-left: 60px;\">The Eclipse guide isn&#8217;t as complete as the RAD examples. <span style=\"text-decoration: underline;\"><strong>I substituted Wink for the JAX-RS implementation<\/strong><\/span> because I simply couldn&#8217;t get DOSGi-CXF running within Websphere-Liberty. The differences are very slight though &#8211; but, if you want to see DOSGi you must take a look at my RAD\/Websphere examples.<\/p>\n<p style=\"padding-left: 30px;\"><a title=\"Rational Application Developer with Websphere Application Server v8.5 deployment (example and tutorial)\" href=\"http:\/\/garysamuelson.com\/liberty_osgi_jaxrs_jpa_01\/OSGi%20and%20JAX-RS%20(with%20CXF%20DOSGi)%20WebsphereRAD%20Workbook.html\"><strong>Rational Application Developer with Websphere Application Server v8.5 deployment (example and tutorial)<\/strong><\/a><\/p>\n<p style=\"padding-left: 60px;\">This Rational Application Developer (RAD) walk-through and Websphere deployment is the most complete example to-date. It includes working examples for <strong>JAX-RS, DOSGi-CXF, JAXB, XML and JSON messaging, JPA integration, and soapUI for ReST service testing<\/strong>&#8230; Please refer to the Apache CXF web-site for detailed architectural discussions for internals on JAX-RS and JAXB JSON\/XML generation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multi-part Series: BPM Integration with OSGI: JAX-RS and JPA JPA OSGi Bundle Delivers (Java) Business Domain Objects (this article) JSON Formatted Business Information through DOSGi (JAX-RS ReST Services) BPM Service and Web-client Consumers for JSON<a class=\"moretag\" href=\"http:\/\/garysamuelson.com\/blog\/?p=918\"> Read more&hellip;<\/a><\/p>\n","protected":false},"author":1,"featured_media":949,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,3,17],"tags":[],"class_list":["post-918","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-process-management-integration","category-business-process-management-bpm","category-bpm-integration-technology"],"_links":{"self":[{"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=918"}],"version-history":[{"count":87,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":1583,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/918\/revisions\/1583"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/949"}],"wp:attachment":[{"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/garysamuelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}