Friday, 22 June 2018

Sample XSLT to Create Delimited String

1. Map Array to an Element using XSLT

<TargetElement>
    <xsl:for-each select="tns:SourceCollection/tns:SourceElement">
        <xsl:value-of select="." />
        <xsl:if test="position() != last()">
            <xsl:value-of select="','"/>
        </xsl:if>
    </xsl:for-each>
</TargetElement>

Monday, 18 June 2018

GIT Bash Commands to Create New Branch and Merge

1. Clone the existing branch to new folder/branch on your machine.

2. Execute following bash commands

git branch new_branch_name

git checkout new_branch_name

add a new file to branch and execute the following command.

git add .

git commit -m "Creating new branch with additional changes"

git push origin new_branch_name

git branch -a

3.  Merge files from Master/Developer branch to new branch

git checkout new_branch_name

git merge origin/master(developer)

git commit -m "Merging changes from Master to new_branch_name"

git push origin new_branch_name

Monday, 4 June 2018

Mulesoft Anypoint Studio 7.1 - JDK Issue Resolution

1. Install latest vesion of JDK - 1.8
2. Set JAVA_HOME with JDK path
3. Set PATH with %JAVA_HOME%bin
4. Update AnypointStudio.ini under AnypointStudio with following JDK path.

--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
-vm
D:\vkanakap\Java\bin\javaw.exe
-vmargs
-Xms512m

Thursday, 24 May 2018

SOACS - ERP CALLBACK IMPLEMENTATION STEPS


ERP CALLBACK IMPLEMENTATION STEPS

    •  Get the user credentials to invoke the SAAS web service
    •  Create a same user in SOACS and password may be anything
    •  Import all SOACS certificates on to ERP servers using security console
    •  Import all SAAS certificates on to SOACS server using EM console.
    • Got to Domain folder in em conole
    • Select Security , Keystore
    • Select System and trust keystore
    • Select Manage option 
    • Import the SAAS certificate
    • Use the following steps to get the SAAS certificate. 
      • Access SAAS URL 
      • Select the lock button in the URL
      • Select certificate
      • Go to details
      • Select copy certificate to file option
      • Use Base 64 Encode format
      • Save the file as *.cer file. 
    • Import SAAS OWSM certificates in SOA EM console
      • Access SAAS WSDL and get the certificates. (Look at the bottom of the WSDL and you will get the certificates
      • https://HostName:port/publicFinancialCommonErpIntegration/ErpIntegrationService?wsdl
      • Copy the certificates and save it as .cer files
      • Open the cer files and get the issuesd to name. 
      • Got to Security and Keystore under domain
      • Create a stripe called owsm
      • Under owsm create a keystore called keystore. 
      • select the keystore and click manage option in the top.
      • import the above owsm certificates with issuer name as alias. ($issuedto.cloud.oracle.com) (CN=$IssuedName, DC=cloud, DC=oracle, DC=com)
    • Create a SOA Composite to invoke ERP service using following WSM policy.
      • Oracle/wss_http_token_over_ssl_client_policy
      • Attach CSF key to the policy.
    • Create a SOA composite to receive the callback from ERP service. Use the following WSM policy to receive the call back.
      • Oracle/wss_saml_bearer_or_username_token_service_policy
Use the following sample xsd and wsdl files to receive the callback message.

<?xml version='1.0' encoding='UTF-8'?>
<schema attributeFormDefault="unqualified" targetNamespace="http://xmlns.oracle.com/SOACoreServices/ERPCallbackServiceService/ERPCallbackService" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="ERPCallbackInput">
<complexType>
<sequence>
<element name="requestId" type="string"/>
<element name="state" type="string"/>
<element name="resultMessage" type="string"/>
</sequence>
</complexType>
</element>
</schema>


<?xml version= '1.0' encoding= 'UTF-8' ?>
<wsdl:definitions
     name="ERPCallbackService"
     targetNamespace="http://oracle.com/sca/soapservice/SOACoreServices/ERPCallbackServiceService/ERPCallbackService"
     xmlns:tns="http://oracle.com/sca/soapservice/SOACoreServices/ERPCallbackServiceService/ERPCallbackService"
     xmlns:inp1="http://xmlns.oracle.com/SOACoreServices/ERPCallbackServiceService/ERPCallbackService"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    >
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://xmlns.oracle.com/SOACoreServices/ERPCallbackServiceService/ERPCallbackService"
                 schemaLocation="../Schemas/ERPCallbackService.xsd"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="onJobCompletionRequestMessage">
        <wsdl:part name="ERPCallbackInput_pn" element="inp1:ERPCallbackInput"/>
    </wsdl:message>
    <wsdl:portType name="onJobCompletion_ptt">
        <wsdl:operation name="onJobCompletion">
            <wsdl:input message="tns:onJobCompletionRequestMessage"/>
        </wsdl:operation>
    </wsdl:portType>
</wsdl:definitions>



Note:   Use the following template to create the certificates. 

-----BEGIN CERTIFICATE----- 
MIIDVzCCAj+p0dBMXCYKcFkw==
-----END CERTIFICATE----- 



Create Database Wallet for Password Less Connection

1. Create a new TNS entry as below ($ORACLE_HOME/NETWORK/ADMIN/TNSNAMES.ORA)

SAMPLEDBCS =
( DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
   (CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SID_OF_DATABASE)
)
)


2. Update SQLBET.ora for the following ($ORACLE_HOME/NETWORK/ADMIN/SQLNET.ORA)

SQLNET.WALLET_OVERRIDE = TRUE
WALLET_LOCATIN = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /u01/abc/xyz/vijaysamplewallet)))
SSL_VERSION = 1.2

3. Create a physical wallet under the above mentioned directory path.

4. Create Wallet Store:

mkstore -wrl /u01/abc/xyz/vijaysamplewallet -create

5. Create Credentails into wallet store :

mkstore -wrl /u01/abc/xyz/vijaysamplewallet -createCredential vijay_credentails user_id <password>

6. Test the connection
sqlplus /@vijay_credentails

Monday, 9 October 2017

Oracle SOA Adapter Tuning Properties


DB Adapter


  1. Distributed Polling - While creating DB adapter to poll the records from DB, select Distributed Polling under polling configuration. This property will  automatically uses the syntax SELECT FOR UPDATE SKIP LOCKED that means the same row cannot be processed multiple times.                                                                                                                           
  2. Singleton Process:  In case of distributed polling (Cluster having multiple Servers) , all the managed servers try to poll and process the records from the DB.  This will have a performance issue.  The JCA Binding Component supports active fail over of inbound Adapter Services. To enable this fail over feature for a given inbound adapter endpoint, we must add the singleton JCA service binding property in the composite.xml within the <binding.jca> element and set it to a value of true. 

                <binding.jca config="SchedulerPollDBAdapter_db.jca">
                <property name="singleton">true</property>
                </binding.jca>

          The above property will make  one node of the cluster will poll for the record. If the active node goes down then other  node of the cluster will become active node and start  polling for the record.

    Above Singleton property can be used for all types of adapters. 

    File/FTP Adapter

    Use following connection factory for polling the files in distributed configuration

    <connection-factory location="eis/HAFileAdapter" adapterRef=""/>

    Configure a database table as a coordinator by modifying Oracle File and FTP Adapter deployment descriptor for the connection-instance corresponding to  eis/HAFileAdapter from the Administration Console:


    1. controlDir - Set this parameter to the directory structure where you want the control files to be stored. Set it to a shared location if multiple Oracle WebLogic Server instances are running in a cluster.
    2. inboundDataSource - Set this parameter to jdbc/SOADataSource. This is the data source where the schemas corresponding to high availability are pre-created. The pre-created schemas are located under MW_HOME/ASreleaseSOA/rcu/integration/soainfra/sql/adapter/createschema_adapter_oracle.sql. To create the schemas elsewhere, use this script. Set the inboundDataSource property accordingly if you choose a different schema.
    3. outboundDataSource - Set this parameter to jdbc/SOADataSource. This is the data source where the schemas corresponding to high availability are pre-created. See inboundDataSource for schema location.
    4. outboundLockTypeForWrite - Set this parameter to oracle if you are using Oracle database. By default Oracle File and FTP Adapters use an in-memory mutex to lock outbound write operations. Choose one of the following values for synchronizing write operations:
    5. memory - Oracle File and FTP Adapters use an in-memory mutex to synchronize access to the file system.


    • oracle - The adapter uses Oracle database sequence.
    • db - The adapter uses a pre-created database table (FILEADAPTER_MUTEX) as the locking mechanism. Use this option only if you are using a schema other than the Oracle database schema
    • user-defined - The adapter uses a user-defined mutex. In order to configure the user-defined mutex, implement the mutex interface:  oracle.tip.adapter.file.Mutex and then configure a new binding-property with the name oracle.tip.adapter.file.mutex and value as the fully qualified class name for the mutex for the outbound reference.

    Sunday, 15 May 2016

    Read Payload from AQ Table

    Use the following Query to get the USER_DATA

    SELECT  USER_DATA.TEXT_LOB
    FROM  QUEUE_TABLE ;

    SELECT USER_DATA.TEXT_VC
    FROM QUEUE_TABLE;

    Oracle Fusion - Order Management Cross Reference

    Summary:  This guide outlines the steps to manage cross-reference data for Sales Order FBDI upload for the source systems,  including export...