Sunday, July 21, 2013

How to change the SOA instance state from ? to a valid state




Sometimes I noticed that the SOA suite 11g instance is displayed as Question Mark ("?") which is quite annoying, here is a way to change that setting in the SOA em and capture the proper state of the instance.


·        Right Click on soa-infra domain and select SOA administration > Common properties.
·        Under SOA Infrastructure Common Properties, select Capture Composite Instance State.

How to change the Audit Level for composites in SOA11g ?



It is really useful to turn the audit level in development environment for Testing. SOA11g has 3 levels of audits: Production, Development and Off.

Rightclick on soa-infra domain> SOA Administration> Common properties> and change the audit level to ‘Development’ 


How to display the System Timestamp in XSLT ?



Use the following function to display System Time in XSL with desired format.

<xsl:value-of select="xp20:format-dateTime(xp20:current-dateTime(),'[D01]/[M01]/[Y0001]')"/> - gives the System Date


<xsl:value-of select="xp20:format-dateTime(xp20:current-dateTime(),'  [H01]:[m01]')"/> - gives the System Time

The above XSL functions will display Date Time in the foll. format: 04/10/2009 11:16

How to find the XSLT version that you are using ?



In order to know the XSLT function we are currently working, use the following function:

system-property('xsl:version')

Ex: create a variable and print the XSLT version as follows:

 <xsl:variable name="XSLTVersion">
    <xsl:value-of select="system-property('xsl:version')"/>

  </xsl:variable>

Console urls for most commonly used Oracle Fusion products




Weblogic server console : http://localhost:7001/console

oracle service bus console : http://localhost:7021/sbconsole

Enterprise manager : http://localhost:7001/em

direct url for soa-infra for testing : http://localhost:8001/soa-infra

soa composer for Editing Business rules etc : http://localhost:8001/soa/composer

worklist app : http://localhost:8001/integration/worklistapp

bam console http://localhost:9001/OracleBAM

b2b console : http://localhost:8001/b2b

b2b serices test console : http://localhost:8001/b2b/services

User Messaging Service (UMS) configuration console : 
http://localhost:8001/sdpmessaging/userprefs-ui

Webservice to test UMS : http://localhost:7001/sdpmessaging/parlayx
/SendMessageService

OAM console : http://localhost:7001/oamconsole

Policy manager : http://localhost:8001/wsm-pm

EDN log console: http://localhost:8001/soa-infra/events/edn-db-log

weblogic spy servelet : http://localhost:8001/dms/Spy


How to put and get files using FTP commands ?



Here are some examples to get/put files on a remote machine from local machine via FTP (File Transfer protocol)

Steps to get the files from remote to local machine
- Open commandprompt from AllPrograms in the computer
- Change directory to which you want to put the files on local machine, using cd command (say cd C:\)
- Now connect to remote machine using ftp command (ftp "hostname"), enter username and password.
- Navigate to the folder from which you want to get the files from remote machine using cd command   Ex: cd /Users
- Say mget* and say y when prompted - This will get all the files to local machine (C:\).

Steps to put the files from local to remote machine
- Open commandprompt from AllPrograms in the computer
- Change directory to which you want to put the files from local machine, using cd command (say cd C:\)
- Now connect to remote machine using ftp command (ftp "hostname"), enter username and password.
- Navigate to the folder to which you want to put the files on remote machine using cd command   Ex: cd /Users
- Say mput* and say y when prompted - This will get all the files to local machine(C:\).

- Say mput m* and this will put all the files starting with 'm'.

How to check the source code of a BPEL component in SOA11g EM ?



Here are the steps to get the BPEL component source code from SOA11g em.

- Login to SOA11g em
- Select the corresponding composite and scroll down to components section.
- Select the required BPEL component.
- Click on the blue circle as follows beside the BPEL process and select 'Source' from Definition section.
TestFileConsumer

How to use String tokenize function in XSLT


Here is an example to use String function: tokenize()
Say the csv has element Role seperated by " ; " and we need to translate using tokenize function:

Roles: Supplier;Vendor;Investor

<Roles>
             <Role>Supplier</Role>
             <Role>Vendor</Role>
             <Role>Investor</Role>
</Roles>

XSL Code:

  <Roles>
                <xsl:call-template name="tokenize">
                  <xsl:with-param name="string"
                                  select="/ns0:Role"/>
                </xsl:call-template>
              </Roles>

  <xsl:template name="tokenize">
    <xsl:param name="separator" select="';'"/>
    <xsl:param name="string"/>
    <xsl:choose>
      <xsl:when test="contains($string,$separator)">
        <Role>
          <xsl:value-of select="substring-before($string,$separator)"/>
        </Role>
        <xsl:call-template name="tokenize">
          <xsl:with-param name="string"
                          select="substring-after($string,$separator)"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <Role>
          <xsl:value-of select="$string"/>
        </Role>
      </xsl:otherwise>
    </xsl:choose>

  </xsl:template>

How to use if-else conditional check using XSLT ?



Example for IF – ELSE in XSLT

Following XSLT snippet will display a value for attribute:  PwdChange. If the input xml has ChangePwd, it will disply its value, if it is blank it will display a FALSE value.

   

How to generate a random/unique number in XSLT ?




  <xsl:variable name="RandomNum">
    <xsl:value-of select="orcl:generate-guid()"/>
   </xsl:variable>