Skip to main content

Posts

Unix Briefing

Variables x=3 y='Hello' Note: there should be no space in assigning variables. Print Variables: echo $x echo $y More accurate printing variables is double quote your variables echo "$x" echo "$y" You can print literal also with variables. echo "Value of variable x is $x" If  else statement x=5 y=7 if [[ $x -lt $y ]]; then echo "true" else echo "false" fi Note : For good practice, put condition in [[...]]. There is semi-colon ; after condition end. fi command indicates closing of if else statements. For comparison, use -lt,-gt, -le, -ge comparison parameters for good practice if ((x>y)); then --- this also works -- Try yourself Nested if else can be done with using elif command x=cool if [ "$x" = "cool" ] then     echo "Cool Beans" elif [ "$x" = "neat" ] then     echo "Neato
Recent posts

Decoded JAVA Embedding code in SOA 11g

JAVA EMBEDDING ACTIVITY addAuditTrailEntry("Base64decode started");              try {    String EncodedStr = (String) getVariableData("EncodedString");    addAuditTrailEntry("input="+EncodedStr);                oracle.soa.common.util.Base64Decoder decoder = new oracle.soa.common.util.Base64Decoder();                    String decoded = null;                  decoded = decoder.decode(EncodedStr);                addAuditTrailEntry("Base64decode decoded="+decoded);                setVariableData("DecodedString",decoded);                } catch (Exception e) {                  addAuditTrailEntry("Base64decode Exception: "+e.getMessage());                }                addAuditTrailEntry("Base64decode ended"); IMPORT STATEMENT for BPEL 1.0 and 1.1   <bpelx:exec import="java.lang.*"/>   <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>   <bpelx:exec impor

Template to remove namespace from xsl

Template to remove namespace from xsl <xsl:template match="*">     <xsl:element name="{local-name()}">       <xsl:apply-templates select="@* | node()"/>     </xsl:element>   </xsl:template>   <xsl:template match="@* | text()">     <xsl:copy/>   </xsl:template>

Set Composite Instance Name

1. Create one variable "Title" of String Type. 2. Drag and drop an Assign Activity. Open it and click right click on Title Variable on left hand side of section. Choose Expression. 3. Goto Advanced Functions and select setCompositeInstanceTitle method. 4. Give input parameter as per your requirement. Note : If this doesn't work out. Store your Input value in separate variable and pass that variable in setCompositeInstanceTitle method

How to connect through WLST

WLST : WLST (Weblogic Scripting Tool) is a command line scripting environment or command line tool to do the weblogic administration task Goto  Weblogic home and open wlst.cmd file. $WLS_HOME/common/bin/wlst.cmd Once open, run below command to connect to weblogic. wls:/offline> connect('weblogic','password1',' t3://localhost:7011 ')

How to use Log4j logger in Simple few steps

Steps to follow : 1. Download Log4j Jar file  and add in Project Lib Path.        http://logging.apache.org/log4j/1.2/download.html 2. Create Log4j.properties file in your project and add below details.      log4j.rootLogger=DEBUG, Appender1,Appender2 log4j.appender.Appender1=org.apache.log4j.ConsoleAppender log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout log4j.appender.Appender1.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n log4j.appender.Appender2=org.apache.log4j.FileAppender log4j.appender.Appender2.File= applog.txt log4j.appender.Appender2.layout=org.apache.log4j.PatternLayout log4j.appender.Appender2.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n 3. In the main method of Java program add below code.         Logger logger = Logger.getLogger(Conn.class);          String log4jConfigFile = System.getProperty("user.dir") + File.separator + "log4j.properties";         PropertyConfigurator.configure(log4jConfigFile);  

Accessing Files Using SFTP on Linux

Starting sftp The command for starting sftp is as follows: ComputerName:~# sftp user@host Few Commands : cd  - change directory on the ftp server to lcd  - change directory on your machine to ls - list files in the current directory on the ftp server lls - list files in the current directory on your machine pwd - print the current directory on the ftp server lpwd - print the current directory on your machine. exit - exit from the sftp program. GET Command: The get command in sftp allows you to download files from the sftp server. Usage: get remote-path [local-path] For example, to download a file named "foo.bar", the following command would be used: sftp>get foo.bar To download this file and save it as "readme.txt", the following command would be used: sftp>get foo.bar readme.txt Getting Multiple Files To download more than one file from the sftp server use the mget command. Usage: mget mget works by expa