Posts

Append two Arrays in Java

Still need to optimize this method but this works with out any issues, public String[] appendArrays(String[] arrayToAdd, String[] arrayFromAdd) {         List<String> list = new ArrayList<String>(Arrays.asList(arrayToAdd));         if (arrayFromAdd != null && arrayFromAdd.length > 0) {             list.addAll(Arrays.asList(arrayFromAdd));         } else {             arrayFromAdd = new String[]{"N/A"};             list.addAll(Arrays.asList(arrayFromAdd));         }         return list.toArray(new String[list.size()]);     }    

Convert ResultSet to Array in Java

public String[] convertRStoArray(ResultSet resultSet, boolean closeResultSet) {         String[] arrayofDataColumns = null;         Map columnsMap = new HashMap();         int columns = 0;         try {             List<String> record = new ArrayList<String>();             while (resultSet.next()) {                 arrayofDataColumns = new String[resultSet.getMetaData().getColumnCount()];                 columns = (resultSet.getMetaData()).getColumnCount();                 String value = null;                 for (int i = 1; i <= columns; i++) {                     value = resultSet.getString(i);                     record.add(value);                     if (columnsMap.containsKey(i)) {                         if (value != null && !value.equals("")) {                             if (columnsMap.get(i) != null && !columnsMap.get(i).equals("") && !columnsMap.get(i).equals(value)) {                                 value = c...

IBM Sterling B2B Integrator Code List Deployment through Command Prompt

C:\Sirish\SterlingIntegrator\install\tp_import> import.cmd -update -passphrase passphrase -input C:\Sirish\bpml_coding\Sirish.xml This is the format requires to import from command prompt. Sirish.xml <?xml version="1.0" encoding="UTF-8"?> < SI_RESOURCES xmlns =" http://www.stercomm.com/SI/SI_IE_Resources " xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance " GISVersion =" 6000 " FrameworkVersion =" 2 ">             < CODE_LISTS >                         < CODE_LIST_XREF >                                     < LIST_NAME > Sirish </ LIST_NAME >      ...

Offset for given Time Zone

import java.util.TimeZone; public String getTimeZoneOffSet(String timeZoneID) {         TimeZone tz = TimeZone.getTimeZone(timeZoneID);         int rawOffset = tz.getRawOffset();         int hour = rawOffset / (60 * 60 * 1000);         int minute = Math.abs(rawOffset / (60 * 1000)) % 60;         return hour + ":" + minute;     } Test:  tc.getTimeZoneOffSet("America/New_York")); This returns Offset for NY -->-5:0 Using Calendar Class import java.util.Calendar ; public int getOffsetForTimeZone(String timeZoneId) {         int a;         Calendar calendar = new GregorianCalendar();         TimeZone timeZ = calendar.getTimeZone();         ti...

Graphical Process Modeler not opening in Sterling Integrator

Most of the times we get the below exception while opening Graphical Process modeler because the IP address in the below URL is not correct. Sterling Integrator host address and GMP host address different then we need to fix the host name and make it common. com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://192.168.235.76:15000/gbm/pmodeler/ProcessModeler.jnlp     at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)     at com.sun.deploy.net.DownloadEngine.getResource(...

Comprehensive Enterprise and B2B Integration Webinar

Comprehensive Enterprise and B2B Integration Suite Webinar (Recorded) from Bradley C Loetz on Vimeo .

eZly POC Web Service - Sterling Integrator

Check out this video on YouTube: http://www.youtube.com/watch?v=Ms0VltPCbgA&feature=youtube_gdata_player

Good quote

Image

Status Report from Service Execution in Sterling Integrator

<input message="Xin"> <assign to="." from="*"></assign> <assign to="." from="Status_Rpt('Report')"></assign> </input> DOMToDoc can also be used in conjunction with the Status_Rpt function to write the information to a document instead of process data.     

Installing IBM Sterling B2B Integrator on Windows 7

Needs to be updated matrix.properties with the value for Windows 7 as 7 and for Windows XP as XP and go for silent installation. Avoid using InstallWizard you should be good. It worked perfectly on my Windows 7 PC. 

IBM B2B Sterling Integrator Developers Blog

https://www.ibm.com/developerworks/mydeveloperworks/blogs/Sterling_Integrator/?lang=en&follow=true

Smarter Commerce Global Summit 2011 Opening General Session

Check out this video on YouTube: http://www.youtube.com/watch?v=y88oTwzwQdg&feature=youtube_gdata_player

Sunset - King of Prussia, PA

Image