Tuesday, August 11, 2015

Encoding a Payload in Sterling Integrator using Java Task

import java.io.InputStream;
import java.lang.StringBuilder;
import com.sterlingcommerce.woodstock.workflow.Document;
import com.sterlingcommerce.woodstock.util.Base64;

Document doc = wfc.getPrimaryDocument();
InputStream in = doc.getInputStream();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < in.available(); i++) {
   sb.append(in.read());
}
byte data[] = sb.toString().getBytes();
byte newdata[] = Base64.encode(data);
doc.setBody(new String( ""+ new String(newdata)+"").getBytes());
return new String(sb.toString());

Friday, July 31, 2015

Sir A.P.J Abdul Kalam

Don't take rest after your first victory because if you fail in second, more lips are waiting to say that your first victory was just luck." - A.P.J Abdul Kalam

"All Birds find shelter during a rain. But Eagle avoids rain by flying above the Clouds." - A.P.J Abdul Kalam

"Failure will never overtake me if my definition to succeed is strong enough". - A.P.J Abdul Kalam

"Man needs difficulties in life because they are necessary to enjoy the success." - A.P.J Abdul Kalam

"If you want to shine like a sun. First burn like a sun." - A.P.J Abdul Kalam

"It is very easy to defeat someone, but it is very hard to win someone" - A.P.J Abdul Kalam

"All of us do not have equal talent. But , all of us have an equal opportunity to develop our talents." - A.P.J Abdul Kalam

" Be more dedicated to making solid achievements than in running after swift but synthetic happiness." -A.P.J Abdul Kalam

"Thinking should become your capital asset, no matter whatever ups and downs you come across in your life." - A.P.J Abdul Kalam

" Without your involvement you can't succeed. With your involvement you can't fail. " - A.P.J Abdul Kalam

Thursday, June 11, 2015

Mule Fundamentals Video Tutorial

To ensure delivery, add no-reply@vimeo.com to your address book.
Vimeo
Mule Fundamentals
by Mulesoft Training /
Forward this email to your friends and family so that they can watch the video too.

              
TM + © Vimeo, LLC
555 West 18th Street, New York, NY 10011
Terms | Privacy Policy

Jack Ma Speech - How to Run Business


Wednesday, June 10, 2015

Intellij IDEA for Students FREE (1 Year)

Folks,
          Jetbrains is offering Intellij IDEA Ultimate Edition for one year FREE for students with edu email address. If you are student and you got .edu email address go and download the most intelligent IDE.

                            https://www.jetbrains.com/estore/students/


Happy Coding!

Friday, June 5, 2015

Introduction To Mule Application Development - Part I

Send Command / Process to Back Ground From Terminal

Here are the list of command to send a process or command to back ground from terminal

1) Press ctrl+z
2) Then type bg (bg means back ground)
3) Then type "disown"

To make sure process is running in back ground execute below command,
ps auxw | grep

Friday, April 3, 2015

#1 Mistake for Startup E-Commerce Web Sites

Contacting Manufacturers of Brand Names For Your Ecommerce Store

XML To JSON Converter

Have the following jars in the classpath,

 commons-beanutils-1.6.1.jar
 commons-collections-3.2.jar
 commons-lang-2.1.jar
 commons-logging-1.1.jar
 ezmorph-1.0.4.jar
 json-lib-2.3-jdk15.jar
 xom-1.0.jar

import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

public class XML2JSONConverter {
    public String convertXMLTOJSON(String inputXML) {
        String jsonString = "";
        try {
            JSON objJson = new XMLSerializer().read(inputXML);
            jsonString = objJson.toString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return jsonString;
    }

    static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }

    public static void main(String[] args) throws Exception {
        File inputFile = new File("input xml file path");
        InputStream inputStreams = new FileInputStream(inputFile);
        XML2JSONConverter toJASON = new XML2JSONConverter();
        System.out.println("JASON Object:" + toJASON.convertXMLTOJSON(convertStreamToString(inputStreams)));
    }
}

Java InputStream to String Covertion

Found this small method to convert InputStream to String, This will help to avoid using Apache IOUtils etc.,

 static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }


Thursday, February 5, 2015

My Experience Talk:What I learnt from a year of start up experience

Sirish Reddy Gongal Reddy has sent you a link to a blog:



Blog: My Experience Talk
Post: What I learnt from a year of start up experience
Link: http://www.myexperiencetalk.com/2014/10/what-i-learnt-from-year-of-start-up.html

--
Powered by Blogger
http://www.blogger.com/

Wednesday, January 7, 2015

Sterling Integrator Purge All Tables

1.  EDI_COMPLIANCE_RPT
2.  EDI_DOCUMENT_STATE
3.  WF_INST_S
4.  WORKFLOW_CONTEXT
5.  WORKFLOW_LIFESPAN
6.  WORKFLOW_DATA
7.  EDIINTDOC
8.  MSGMDNDUP
9.  MSGMDNCORRELATION
10. WEBX_MINED_DATA
11. WF_INACTIVE
12. GENERIC_ACK
13. CORRELATION_SET
14. ACT_SESSION
15. ACT_AUTHENTICATE
16. ACT_AUTHORIZE
17. ACT_XFER
18. ACT_NON_XFER
19. DATA_FLOW
20. DMI_ROUTE
21. DMI_ROUTE_FACT
22. MBX_MESSAGE
23. TRANS_DATA

Sunday, November 9, 2014

Startup Notes

Here are the some notes out of many Start-up entrepreneurs interviews and from their failed stories...

  • Every start-up savvy must read all the articles listed here http://www.paulgraham.com/articles.html
  • thehackernews.com or Google it on hacker news.... Post the product / idea here and get the early feed back and work on it.
  • Try out and fail..
  • Never work in isolation, Do frequent release of the product have early user access and pay attention to users feedback. It's okey to be crappy but fix the damn thing.
  • Research the idea in targeted market segment.
  • Getting priorities right..Logo is not important :) Build and Ship.
  • Write content and share with right audience and market your self.
  • Customer feedback is extremely important. Let them talk and listen to them.

How do you turn your mind into the type that startup ideas form in unconsciously? 

(1) Learn a lot about things that matter, then 

(2) work on problems that interest you 

(3) with people you like and respect. The third part, incidentally, is how you get co-founders at the same time as the idea.


(4) Look for a Startup Mentor, You need one who can guide you in all aspects right from Decisions, Marketing and Customer handling etc..




Thursday, November 6, 2014

Saturday, September 13, 2014

Network Troubleshooting

Came across this cool URL while I am troubleshooting my port forwarding on Linksys E1200 router.

http://ping.eu/

Friday, September 12, 2014

java.lang.Out OfMemoryError

Unveiling the java.lang.Out OfMemoryError
— When we encounter a java.lang.OutOfMemoryError, we often find that Java heap dumps, along with other artifacts, are generated by the Java Virtual Machine. If you feel like jumping right into a Java heap dump when you get a java.lang.OutOfMemoryError, don’t worry, it’s a normal thought. You may be able to discover something serendipitously, but it’s not always the best idea to analyze Java heap dumps, depending on the situation you are facing. We first need to investigate the root cause of the java.lang.OutOfMemoryError.


http://java.sys-con.com/node/1229281

Good Read

Saturday, August 16, 2014

Gandi Veeranjaneya Swami Temple, Kadapa

A must visit Sri Verranajaneya Swami temple in Kadapa (Dt). Here is the address,

Sri Veeranjaneya Swami Temple,
Gandi, Vempalli, Kadapa (Dt).




Friday, August 1, 2014

Android Development

Started getting some insights in to Android development, part of my education I have found one nice presentation on  YouTube by Amesh Saha (I think) on Android development, will share the link... Here are the screen shots of the presentation, 





Best click

Captured with my iPhone, one of my random best click,

Picture is powerful than words...

Some cool motivational pictures ...

  







Wednesday, June 11, 2014

How to Become a Millionaire by Age 30

Hi,

Worth reading it...

I thought you'd like this:
Read this article

How to Become a Millionaire by Age 30
Ten steps to take to get, and stay rich in the earliest stage of your career.

Saturday, November 9, 2013

XHOST Setup on Ubuntu

It is mandatory to set-up XHOST in order to run any installation through UI, for Instance Oracle installation. If XHOST is not configured property Ubuntu will not trigger any UI installer window.

How to Set-up:

Edit default users bashrc file (Under user Home directory)

sirishg@ubuntu:~$ vi .bashrc

Add the following lines,

xhost local:<username>

Example:

#### Sirish Changes Start ####
echo Adding xhost for users sterling, oracle and sirishg

xhost local:sterling
xhost local:oracle
xhost local:sirishg

echo Adding xhost for users Done!
#### Sirish Changes End ####

Wednesday, May 29, 2013

My EDI Notes

E
​DI File Structure

ISA
GS
ST
Abouve 3 are envelope hearders.

It contain transaction details, sender and receiver details, transaction details, X12 standard versions.

SE
GE
IEA

Abouve 3 are envelope Tailers.

*) EDI file is delimiter file.
*) Each segment (line) is terminated by segmenet terminated. default symbol is ~
*) Segment is collection of elements and composite elements. Composite element is a sub element.
*) Each sgement will contain some specific information for the transaction.

ISA

ISA*00* *00* *08*9251750000 *08*1234567890 *030627*1304*U*00401*000001403*0*P*>~ 

ISA Elements Details

ISA01 Authorization Information Qualifier
ISA02 Authorization Information
ISA03 Security Information Qualifier
ISA04 Security Information
ISA05 Interchange ID Qualifier
ISA06 Interchange Sender ID
ISA07 Interchange ID Qualifier
ISA08 Interchange Receiver ID
ISA09 Interchange Date
ISA10 Interchange Time
ISA11 Interchange Control Standards ID
ISA12 Interchange Control Version Number
ISA13 Interchange Control Number
ISA14 Acknowledgement Requested
ISA15 Test Indicator
ISA16 Subelement Separator

X12 VS EDIFact?
   


Friday, May 24, 2013

Avoid duplicate file processing in Sterling File Gateway (SFG)

The actual error we see in the logs is just the way SFTP in SI detects
duplicate files and since you have the option in the
mailbox.properties set to:

disallowDuplicateMessages=false

This means that duplicate files are allowed and therefore SFG
processed those duplicate uploads.

So the partner should investigate why did their application trigger a
duplicate upload of the same file.

If you want to avoid duplicate uploads, you should consider setting
the option disallowDuplicateMessages to true in both nodes, this will
stop SI from accepting duplicate files.

If you want to make that change, you will need to modify\create your
customer_overrides.properties on both nodes and add the following
line:
mailbox.disallowDuplicateMessages=true

Both nodes need to be restarted for the change to take effect.

Thursday, May 16, 2013

Attach multiple SSH Authorized User Key to Sterling File Gateway (SFG) Profile


Multiple source systems can talk to one Sterling Integrator SFTP server and the Authorized User Key for the remote servers could be different. The limitation with SFG is we can’t attach multiple Authorized user key to SFG profile, if we edit the profile SFG will list all the user profiles in drop down it mean we can select only One.
To overcome this problem  DO NOT attach SSH Authorized User Keys from SFG instead go to Sterling Integrator Dashboard and edit the SFG Profile User there is page to attach multiple SSH Authorized User  Keys to one user.
SI Dashboard > Account > User Accounts > Account Name (Search on Account Name), Edit the user and assign multiple SSH Authorized User Keys. 


Wednesday, May 15, 2013

Setting up SSH public/private keys


Setting up SSH public/private keys

SSH (Secure Shell) can be set up with public/private key pairs so that you don't have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.​
     

SSH Version 2

​On the local machine, type the BOLD part. The non-bold part is what you might see as output or prompt.
  • Step 1:
    % ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return)
    Enter same passphrase again:
    (just type return)
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste the content of the local ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the remote host.
  • RSA instead of DSA
    • If you want something strong, you could try
      % ssh-keygen -t rsa -b 4096
    • Instead of the names id_dsa and id_dsa.pub, it will be id_rsa and id_rsa.pub , etc.
    • The rest of the steps are identical.
That's it!
FAQ:
  • Q: I follow the exact steps, but ssh still ask me for my password!
  • A: Check your remote .ssh directory. It should have only your own read/write/access permission (octal 700)
    % chmod 700 ~/.ssh

SSH Version 1

  • Step 1:
    % cd ~/.ssh
    % ssh-keygen -t rsa1
    Generating public/private rsa1 key pair.
    Enter file in which to save the key (~/.ssh/identity):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return) Enter same passphrase again: (just type return)
    Your identification has been saved in ~/.ssh/identity
    Your public key has been saved in ~/.ssh/identity.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste content of the local ~/.ssh/identity.pub file into the file ~/.ssh/authorized_keys on the remote host.

​​
Reference​
​​
​​


​                   
http://www.ece.uci.edu/~chou/ssh-key.html

​ Configure External Databases to IBM Sterling B2B Integrator

We can add multiple
​​
external databases to IBM Sterling B2B Integrator. To add custom database need to do the following things,

1. Stop IBM Sterling B2B Integrator
2. Navigate to SI_INSTALL_DIR\properties and edit jdbc_customer.properties.in and add the below properties.
3. Run setupfiles.bat/sh (SI_INSTALL_DIR\bin\setupfiles.bat/sh)
4. Start IBM Sterling B2B Integrator

Note: SI_EXTENSION is my pool name. We can name whatever we want.

MS SQL Server Database

Need to change the test query depending on server, For MS SQL Server Database
SI_EXTENSION.testOnReserveQuery=SELECT GETDATE()

Oracle Database

Need to change the test query depending on server, For Oracle Database
SI_EXTENSION.testOnReserveQuery=SELECT * FROM DUAL

jdbc_customer.properties.in

SI_EXTENSION.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
SI_EXTENSION.url=jdbc:sqlserver://localhost:1433;databaseName=SI_EXTENSION;SelectMethod=cursor
SI_EXTENSION.user=sa
SI_EXTENSION.password=
#SI_EXTENSION.maxconn=20
SI_EXTENSION.storedProcClassName=com.sterlingcommerce.woodstock.util.frame.jdbc.SybaseStoredProcQuery
SI_EXTENSION.varDataClassName=com.sterlingcommerce.woodstock.util.frame.jdbc.MSSQLVarData
SI_EXTENSION.catalog=SI_EXTENSION
SI_EXTENSION.type=remote
SI_EXTENSION.tr

​​
ansaction=true
SI_EXTENSION.testOnReserve=true
SI_EXTENSION.testOnReserveQuery=SELECT GETDATE()
SI_EXTENSION.testOnReserveInterval=60000
SI_EXTENSION.maxRetries=100
SI_EXTENSION.blobPageSize=1024000
SI_EXTENSION.compressBlob=true
SI_EXTENSION.dbvendor=mssql
SI_EXTENSION.buffersize=500
SI_EXTENSION.maxsize=20
SI_EXTENSION.initsize=0
SI_EXTENSION.factory=com.sterlingcommerce.woodstock.util.frame.jdbc.ConnectionFactory
SI_EXTENSION.behaviour=2
SI_EXTENSION.lifespan=0
SI_EXTENSION.idletimeout=86400000
SI_EXTENSION.housekeepinginterval=3600000
SI_EXTENSION.waittime=1000
SI_EXTENSION.errorMissingTable=16945
SI_EXTENSION.systemPool=true       



How to ​Validate Connection Pool Creation
Go to Dashboard --> Operations --> System --> Troubleshooter --> Database Usage we will find connection pool.

Question

Can I use AD (Active Directory) Logins in Sterling B2B Integrator to communicate with SQL Server?

Answer


Active Directory logins cannot be used for Sterling B2B Integrator and SQL Server. The jdbc driver Sterling B2B Integrator uses does not allow using AD accounts. SQL Server accounts must be used.

http://www-01.ibm.com/support/docview.wss?uid=swg21683970