{"id":31,"date":"2016-05-06T08:50:18","date_gmt":"2016-05-06T08:50:18","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=31"},"modified":"2016-05-06T08:50:44","modified_gmt":"2016-05-06T08:50:44","slug":"sugarcrm-integration-with-custom-java-applications","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/05\/06\/sugarcrm-integration-with-custom-java-applications\/","title":{"rendered":"SugarCRM integration with custom Java applications"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<td>\n<h4>SugarCRM integration and Apache Axis<\/h4>\n<p><span style=\"font-size: small;\">The most read articles here on beanizer.org are with no doubt those related to <a title=\"SugarCRM\" href=\"http:\/\/www.sugarcrm.com\/crm\/\" target=\"_blank\">SugarCRM<\/a> integration. Up to now our articles have focused on integrating with PHP,\u00a0 but following some readers&#8217; request, starting from this article we&#8217;ll talk about integrating SugarCRM with Java. Though Java has strong and long lasting SOAP support,\u00a0 we&#8217;ve been asked for some kind of tutorial specific to Sugar.<br \/>\nIn this first article we&#8217;ll see how to use Axis\u00a0 and its WSDL2Java tool to build the foundation for SugarCRM\/Java integration, and will see how to authenticate, get modules list and query SugarCRM thru our SOAP layer.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a title=\"Apache Axis\" href=\"http:\/\/ws.apache.org\/axis\/\" target=\"_blank\">Apache Axis<\/a>\u00a0 is an implementation of the SOAP (&#8220;Simple Object Access Protocol&#8221;) submission to W3C.\u00a0 It exists for Java and C++, we&#8217;re obviously going to use the first one. What we are particularly interested in is the class WSDL2Java (included in the distribution) which, given a wsdl file, is able to automatically build the corresponding\u00a0 classes for methods and data types. From now on I&#8217;ll take for granted the following assumptions about what we are using:<\/p>\n<ul>\n<li>JDK5 (or higher)<\/li>\n<li>SugarCRM 5<\/li>\n<li>Axis 1.4 (Java version)<\/li>\n<\/ul>\n<p><span style=\"font-size: small;\"><br \/>\nAfter downloading and uncompressing the correct axis distribution, from a console &#8220;cd&#8221; into axis&#8217; directory. You&#8217;ll see there&#8217;s a &#8220;lib&#8221; directory, containing all the jar files we need.\u00a0 Now we need to launch the class &#8220;WSDL2Java&#8221; with a reference to\u00a0 a valid sugar crm wsdl file. Given that your sugar crm installation is located at &#8220;http:\/\/localhost\/sugarcrm&#8221; , the command line on Linux could be something like:<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ffffff;\">\u00a0java -cp lib\/axis.jar:lib\/axis-ant.jar:lib\/commons-discovery-0.2.jar:<br \/>\nlib\/commons-logging-1.0.4.jar:lib\/jaxrpc.jar:<br \/>\nlib\/log4j-1.2.8.jar:lib\/saaj.jar:lib\/wsdl4j-1.5.1.jar<br \/>\norg.apache.axis.wsdl.WSDL2Java -o . -d Session -p org.beanizer.sugarcrm http:\/\/localhost\/sugarcrm\/soap.php?wsdl<\/span><\/p>\n<p><span style=\"font-size: small;\"><br \/>\nThe &#8220;-o&#8221; option will set the output directory, &#8220;-d&#8221;\u00a0specifies how to deploy the server implementation (in this case &#8220;Session&#8221; means that a new instance of the implementation class will be created for each session) and &#8220;-p&#8221; defines the destination package to use. If everything goes fine, we will have on the current directory a new &#8220;org.beanizer.sugarcrm&#8221; package, containing a bunch of classes that represent our java SOAP interface to Sugar CRM. In our projects we will need this newly created package together with the jars contained in the &#8220;lib&#8221; directory to reside in our classpath.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h4>First steps with Java \/ SugarCRM integration<\/h4>\n<p><span style=\"font-size: small;\">In our classes don&#8217;t forget to import the needed packages:<\/span><\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #f5deb3;\">            \r\n        <span style=\"color: #00cc99;\">import<\/span> java.security.MessageDigest;\r\n        <span style=\"color: #00cc99;\">import<\/span> org.beanizer.sugarcrm.*;\r\n\r\n<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>Let&#8217;s have a look at how to use the generated classes. First thing we will instantiate a &#8220;SugarsoapLocator&#8221; class, which will allow us to open a &#8220;port&#8221; object towards our SugarCRM.<\/p>\n<pre><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Sugarsoap service<span style=\"color: #00ffff;\">=<\/span><span style=\"color: #ffa500;\">new<\/span> <span style=\"color: #b2dfee;\">SugarsoapLocator<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SugarsoapPortType port<span style=\"color: #00ffff;\">=<\/span>service.<span style=\"color: #b2dfee;\">getsugarsoapPort<\/span><span style=\"color: #00ffff;\">\r\n                       (<\/span><span style=\"color: #ffa500;\">new<\/span> java.net.<span style=\"color: #b2dfee;\">URL<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">http:\/\/localhost\/sugarcrm\/soap.php<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n\u00a0<\/span><\/span><\/pre>\n<p><span style=\"font-size: small;\"><span style=\"color: #f5deb3;\">There are a few methods that don&#8217;t require us to be authenticated, so at this point we are already able to call them:<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">            \r\n            System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span>port.<span style=\"color: #b2dfee;\">get_server_time<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span>port.<span style=\"color: #b2dfee;\">get_server_version<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;   \r\n       \r\n<\/span><\/span><\/span><\/pre>\n<p><span style=\"font-size: small;\"><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">I guess their usage is quite obvious.<br \/>\nBut for most methods we need to &#8220;login&#8221; to SugarCRM.\u00a0 To do this, we need a valid user and password. Note that the password must be MD5 encoded and in hexadecimal format. We&#8217;ll use the &#8220;MessageDigest&#8221; class included in java.security, and a custom method (see below)\u00a0 &#8220;getHexString&#8221; to convert the byte array result we get into hexadecimal.\u00a0 If the authentication\u00a0 succedes we&#8217;ll receive back a session id , which we&#8217;ll use for subsequent\u00a0 method calls,\u00a0 otherwise the session id will be &#8220;-1&#8221; and we&#8217;ll receive an error. Here is the code:<\/span><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">            \r\n            User_auth userAuth<span style=\"color: #00ffff;\">=<\/span><span style=\"color: #ffa500;\">new<\/span> <span style=\"color: #b2dfee;\">User_auth<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            userAuth.<span style=\"color: #b2dfee;\">setUser_name<\/span><span style=\"color: #00ffff;\">(<\/span><\/span><span style=\"color: #f5deb3;\"><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">myuser\"<\/span><\/span><span style=\"color: #f5deb3;\"><span style=\"color: #00ffff;\">)<\/span>;\r\n            MessageDigest md <span style=\"color: #00ffff;\">=<\/span>MessageDigest.<span style=\"color: #b2dfee;\">getInstance<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">MD5<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            String password<span style=\"color: #00ffff;\">=<\/span><span style=\"color: #b2dfee;\">getHexString<\/span><span style=\"color: #00ffff;\">(<\/span>md.<span style=\"color: #b2dfee;\">digest<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">mypassword<\/span><span style=\"color: #00cd00;\">\"<\/span>.<span style=\"color: #b2dfee;\">getBytes<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            userAuth.<span style=\"color: #b2dfee;\">setPassword<\/span><span style=\"color: #00ffff;\">(<\/span>password<span style=\"color: #00ffff;\">)<\/span>;\r\n            userAuth.<span style=\"color: #b2dfee;\">setVersion<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">0.1<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            Set_entry_result loginRes<span style=\"color: #00ffff;\">=<\/span>port.<span style=\"color: #b2dfee;\">login<\/span><span style=\"color: #00ffff;\">(<\/span>userAuth, <span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">myAppName<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">Error=<\/span><span style=\"color: #00cd00;\">\"<\/span> <span style=\"color: #00ffff;\">+<\/span> loginRes.<span style=\"color: #b2dfee;\">getError<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>.<span style=\"color: #b2dfee;\">getNumber<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            String sessionID <span style=\"color: #00ffff;\">=<\/span> loginRes.<span style=\"color: #b2dfee;\">getId<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">Session<\/span> <span style=\"color: #00cd00;\">ID:<\/span> <span style=\"color: #00cd00;\">\"<\/span> <span style=\"color: #00ffff;\">+<\/span> sessionID<span style=\"color: #00ffff;\">)<\/span>;\r\n\u00a0<\/span><\/span><\/span><\/pre>\n<p><span style=\"font-size: small;\"><span style=\"color: #f5deb3;\"><br \/>\nOnce we have a valid session id we can interact with\u00a0 SugarCRM. Let&#8217;s see how to query SugarCRM to get some account records. The parameters we pass to the &#8220;get_entry_list&#8221; method of our &#8220;port&#8221; object are:<br \/>\n<\/span><\/span><\/p>\n<ul>\n<li>a session id<\/li>\n<li>a module name (&#8220;Accounts&#8221; in this case, but the method is generic so, to query for contacts, it would be &#8220;Contacts&#8221; and so on)<\/li>\n<li>a query (empty this time, but can be something like &#8220;name =&#8217;myname&#8217; &#8221; or anything else provided we use valid syntax, existing fields and the right value type)<\/li>\n<li>order by clause<\/li>\n<li>offset (numeric) , which record to start from<\/li>\n<li>a String array with the names of the fields to retrieve<\/li>\n<li>max number of records to retrieve<\/li>\n<li>if deleted records have to be retrieved (Sugar CRM doesn&#8217;t physically delete records, it just flags them as deleted)<\/li>\n<\/ul>\n<p><span style=\"font-size: small;\"><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">\u00a0<\/span><\/span><\/span><\/p>\n<pre><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">\r\n            Get_entry_list_result entryList<span style=\"color: #00ffff;\">=<\/span>port.<span style=\"color: #b2dfee;\">get_entry_list<\/span><span style=\"color: #00ffff;\">(<\/span>sessionID,<span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">Accounts<\/span><span style=\"color: #00cd00;\">\"<\/span>,<span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">\"<\/span>, <span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">\"<\/span>,<span style=\"color: #cdcd00;\">0<\/span>,<span style=\"color: #ffa500;\"> \r\n                                new<\/span> String[]<span style=\"color: #00ffff;\">{<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">name<\/span><span style=\"color: #00cd00;\">\"<\/span>,<span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00cd00;\">phone_office<\/span><span style=\"color: #00cd00;\">\"<\/span><span style=\"color: #00ffff;\">}<\/span>, <span style=\"color: #cdcd00;\">10<\/span>, <span style=\"color: #cdcd00;\">0<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span>entryList.<span style=\"color: #b2dfee;\">getError<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>.<span style=\"color: #b2dfee;\">getDescription<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            <span style=\"color: #ffa500;\">for<\/span><span style=\"color: #00ffff;\">(<\/span>Entry_value entry : entryList.<span style=\"color: #b2dfee;\">getEntry_list<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">{<\/span>\r\n                Name_value[] nvl<span style=\"color: #00ffff;\">=<\/span>entry.<span style=\"color: #b2dfee;\">getName_value_list<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n                System.out.<span style=\"color: #b2dfee;\">println<\/span><span style=\"color: #00ffff;\">(<\/span>  nvl[<span style=\"color: #cdcd00;\">0<\/span>].<span style=\"color: #b2dfee;\">getValue<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">+<\/span> <span style=\"color: #00cd00;\">\"<\/span> <span style=\"color: #00cd00;\">-<\/span> <span style=\"color: #00cd00;\">\"<\/span> <span style=\"color: #00ffff;\">+<\/span> nvl[<span style=\"color: #cdcd00;\">1<\/span>].<span style=\"color: #b2dfee;\">getValue<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>;\r\n            <span style=\"color: #00ffff;\">}\r\n<\/span>\u00a0<\/span><\/span><\/span><\/pre>\n<p><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\">We simply query for a list of entries, and then cycle through them to get the name\/value\u00a0 couple of the requested fields (in this case just &#8220;name&#8221; and &#8220;phone_office&#8221;).<br \/>\nThere&#8217;s a lot more to say about &#8220;get_entry_list&#8221;, but I think there&#8217;s enough meat for this session, so I&#8217;ll leave further explanations to the following articles.<\/span><\/span><\/p>\n<p>The only thing left is the little method implemented to convert an array of bytes to an hexadecimal string. Here it is:<\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #f5deb3;\"><span style=\"color: #ffffcc;\"> 1:<\/span>    <span style=\"color: #ffa500;\">public<\/span> String <span style=\"color: #b2dfee;\">getHexString<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #cc6600;\">byte<\/span>[] data<span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #ffa500;\">throws<\/span> Exception <span style=\"color: #00ffff;\">{<\/span> \r\n<span style=\"color: #ffffcc;\"> 2:<\/span>        StringBuffer buf <span style=\"color: #00ffff;\">=<\/span> <span style=\"color: #ffa500;\">new<\/span> <span style=\"color: #b2dfee;\">StringBuffer<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>; \r\n<span style=\"color: #ffffcc;\"> 3:<\/span>        <span style=\"color: #ffa500;\">for<\/span> <span style=\"color: #00ffff;\">(<\/span><span style=\"color: #cc6600;\">int<\/span> i <span style=\"color: #00ffff;\">=<\/span> <span style=\"color: #cdcd00;\">0<\/span>; i <span style=\"color: #00ffff;\">&lt;<\/span> data.length; i<span style=\"color: #00ffff;\">+<\/span><span style=\"color: #00ffff;\">+<\/span><span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">{<\/span> \r\n<span style=\"color: #ffffcc;\"> 4:<\/span>                <span style=\"color: #cc6600;\">int<\/span> halfbyte <span style=\"color: #00ffff;\">=<\/span> <span style=\"color: #00ffff;\">(<\/span>data[i] <span style=\"color: #00ffff;\">&gt;<\/span><span style=\"color: #00ffff;\">&gt;<\/span><span style=\"color: #00ffff;\">&gt;<\/span> <span style=\"color: #cdcd00;\">4<\/span><span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">&amp;<\/span> <span style=\"color: #cdcd00;\">0x0F<\/span>; \r\n<span style=\"color: #00cd00;\"> 5:<\/span>                <span style=\"color: #cc6600;\">int<\/span> two_halfs <span style=\"color: #00ffff;\">=<\/span> <span style=\"color: #cdcd00;\">0<\/span>; \r\n<span style=\"color: #ffffcc;\"> 6:<\/span>                <span style=\"color: #ffa500;\">do<\/span> <span style=\"color: #00ffff;\">{<\/span> \r\n<span style=\"color: #ffffcc;\"> 7:<\/span>                        <span style=\"color: #ffa500;\">if<\/span> <span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #cdcd00;\">0<\/span> <span style=\"color: #00ffff;\">&lt;=<\/span> halfbyte<span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">&amp;<\/span><span style=\"color: #00ffff;\">&amp;<\/span> <span style=\"color: #00ffff;\">(<\/span>halfbyte <span style=\"color: #00ffff;\">&lt;=<\/span> <span style=\"color: #cdcd00;\">9<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span> \r\n<span style=\"color: #ffffcc;\"> 8:<\/span>                        buf.<span style=\"color: #b2dfee;\">append<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #cc6600;\">char<\/span><span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">'<\/span><span style=\"color: #00cd00;\">0<\/span><span style=\"color: #00cd00;\">'<\/span> <span style=\"color: #00ffff;\">+<\/span> halfbyte<span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>; \r\n<span style=\"color: #ffffcc;\"> 9:<\/span>                    <span style=\"color: #ffa500;\">else<\/span> \r\n<span style=\"color: #00cd00;\">10:<\/span>                        buf.<span style=\"color: #b2dfee;\">append<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #cc6600;\">char<\/span><span style=\"color: #00ffff;\">)<\/span> <span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00cd00;\">'<\/span><span style=\"color: #00cd00;\">a<\/span><span style=\"color: #00cd00;\">'<\/span> <span style=\"color: #00ffff;\">+<\/span> <span style=\"color: #00ffff;\">(<\/span>halfbyte <span style=\"color: #00ffff;\">-<\/span> <span style=\"color: #cdcd00;\">10<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span><span style=\"color: #00ffff;\">)<\/span>; \r\n<span style=\"color: #ffffcc;\">11:<\/span>                        halfbyte <span style=\"color: #00ffff;\">=<\/span> data[i] <span style=\"color: #00ffff;\">&amp;<\/span> <span style=\"color: #cdcd00;\">0x0F<\/span>; \r\n<span style=\"color: #ffffcc;\">12:<\/span>                <span style=\"color: #00ffff;\">}<\/span> <span style=\"color: #ffa500;\">while<\/span><span style=\"color: #00ffff;\">(<\/span>two_halfs<span style=\"color: #00ffff;\">+<\/span><span style=\"color: #00ffff;\">+<\/span> <span style=\"color: #00ffff;\">&lt;<\/span> <span style=\"color: #cdcd00;\">1<\/span><span style=\"color: #00ffff;\">)<\/span>; \r\n<span style=\"color: #ffffcc;\">13:<\/span>        <span style=\"color: #00ffff;\">}<\/span> \r\n<span style=\"color: #ffffcc;\">14:<\/span>        <span style=\"color: #ffa500;\">return<\/span> buf.<span style=\"color: #b2dfee;\">toString<\/span><span style=\"color: #00ffff;\">(<\/span><span style=\"color: #00ffff;\">)<\/span>; \r\n<span style=\"color: #00cd00;\">15:<\/span>    <span style=\"color: #00ffff;\">}<\/span> <\/span><\/pre>\n<p><span style=\"color: #f5deb3;\"><span style=\"color: #f5deb3;\"><br \/>\nHasta la proxima.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h4>Credits<\/h4>\n<p>1) Many thanks to<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/webmail.beanizer.org\/nwimg\/mail\/smooth\/space.gif\" alt=\"\" width=\"5\" height=\"1\" \/> <a href=\"mailto:adam@alandstreet.com\">Adam Wells<\/a> for bug-fixing the code<\/p>\n<p>2) The &#8220;getHexString&#8221; method code is taken from <a href=\"http:\/\/www.anyexample.com\/programming\/java\/java_simple_class_to_compute_md5_hash.xml\">www.anyexample.com<\/a> .<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SugarCRM integration and Apache Axis The most read articles here on beanizer.org are with no doubt those related to SugarCRM integration. Up to now our articles have focused on integrating with PHP,\u00a0 but following some readers&#8217; request, starting from this article we&#8217;ll talk about integrating SugarCRM with Java. Though Java has strong and long lasting ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/05\/06\/sugarcrm-integration-with-custom-java-applications\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4,2],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-java","category-soap","category-sugarcrm"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":2,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":33,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/31\/revisions\/33"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}