Skip to main content

Posts

Showing posts with the label jca

Add/Delete Hours/Minutes in Xquery

Hi, Recently i came up with a requirement where due to different timezone we have to send received date with 4 hour difference, We tried same thing to control in XSLT but in that case we have to write one XSLT template which will handle it. Yes that work for us as we need to handle time part only, in-respect of what's going to be happen with Date but for feature we must be prepared to handle date also, so we come up with some pre-defined xquery function who will take care our this timezone issue. Subtract minutes from date. {xs:dateTime(runTs)  -  xs:dayTimeDuration("PT15M")} Subtract hours from date {xs:dateTime(runTs)  -  xs:dayTimeDuration("PT4H")} Add hours in date {xs:dateTime(runTs)  + xs:dayTimeDuration("PT4H")} Add minutes in date. {xs:dateTime(runTs)  +  xs:dayTimeDuration("PT15M")} Sample Test case: 4 Hours subtract from input dateTime  Input:   <runTs>2019-07-02T03:18:15.3...

Remove New line from XML Data in XSLT

Hi, In some case where we are sending data to a file and their may case data contain EOL itself which will be a data issue to other system which process file. In such cases we have to handle EOL in XSLT only. <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/Load_PROJ_SCM_V_Data"                 xmlns:oraxsl="http://www.oracle.com/XSL/Transform/java"                 ">   <oracle-xsl-mapper:schema>     <!--SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY.-->     <oracle-xsl-mapper:mapSources>       <oracle-xsl-mapper:source type="WSDL">             </oracle-xsl-mapper:target>     </oracle-xsl-mapper:mapTargets>     <!--GENERATED BY ORACLE XSL MAPPER 12.1.3.0.0(XSLT Build...

Advance: JCA properties for Oracle SOA Adapter

JCA Properties for Oracle File and FTP Adapters: ConcurrentThreshold:  The maximum number of translation activities that can be allowed to execute in parallel for a particular outbound scenario. The translation step during the outbound operation is CPU-intensive and must be guarded because it might cause other applications or threads to starve. The maximum value is  100 . Lenient :  If set to  true , then the Orcle File Adapter does not complain if it does not have enough permission to read or write to the inbound directory. The default value of this property is  false . NumberMessages :  This property is used for outbound batching. The outgoing file is created when the number of messages condition is met. The parameter is of type  int and is not mandatory. The default value is  1 . Recursive :  If this property is set to  true , then the adapter can process all the sub-directories under the main input directory recurs...

When Why to use Work Managers in Weblogic

" If you do nothing on dispatch policies in OSB proxy or business services, all is done in the Default Workmanager. But since some constructions, not only service call-outs, need other threads to finish the job,  you can get stuck threads because the workmanager's threadpool gets empty having all or near to all threads waiting , leaving no threads to pickup work to free the others.  If all threads in the default queue become stuck, the server changes its health state to "critical. If all threads in weblogic.admin.HTTP, weblogic.admin.RMI, or a user-defined execute queue become stuck, the server changes its health state to "warning. Work Managers have a Ignore Stuck Thread options that gives the ability to execute long running jobs.  " Based on our need we can create one of following work manager's: For OSB to work optimally and prevent floading WebLogic’s threadpool with hogged/stuck threads you should create 3 FairShareRequest classes ...

Oracle SOA LDAP Adapter End to End Configuration

What is LDAP Adapter: The Oracle LDAP adapter provides bi-directional connectivity with LDAP V3- compliant directory servers. The chapter provides information on how to model the LDAP adapter as a reference to perform CRUD (Create, Read, Update and Delete) operations and how to model the LDAP adapter as an inbound publication service on a directory server. Information describing various users, applications, files, printers, and other resources accessible from a network is often collected into a special database called an LDAP directory. Access to LDAP directories is a basic requirement of enterprise workflows. The LDAP Adapter Configuration Wizard provides a graphical and intuitive interface to model LDAP services to send requests to and receive responses from LDAP servers. LDAP (Lightweight Directory Access Protocol), is an Internet protocol for accessing information directories. A directory service is a distributed database application designed to manage the entries and attribu...

Dynamic XML element processing & Dynamic JSON generation from XML

xquery version "1.0" encoding "utf-8"; (:: OracleAnnotationVersion "1.0" ::) declare namespace www="http://www.inc.teamshare.gems.com"; (:: import schema at "../Schemas/GemsTeamshareData.xsd" ::) declare namespace pul="http://xmlns.oracle.com/pcbpel/adapter/db/top/Pull_GEMS_INCREMENTAL_DATA"; (:: import schema at "../Schemas/Pull_GEMS_INCREMENTAL_DATA_table.xsd" ::) declare variable $inputVariable.GemsIncrementalDataCollection as element() (:: schema-element(pul:GemsIncrementalDataCollection) ::) external; declare variable $TempListExtractData as element() (:: schema-element(www:TeamShareData) ::) external; declare function local:funcJsonteamshare($inputVariable.GemsIncrementalDataCollection as element() (:: schema-element(pul:GemsIncrementalDataCollection) ::),                                          $TempListExtractData as element() (:: schema-element(www:TeamShareDa...

Oracle SOA XSLT Date difference

Hello everyone, Recently i came up with a requirement where i need to calculate date difference between current date and some old date, For same i wrote a XSLT which will help you to do same. One main thing, You need to use "version="2.0"" version for XSLT because we are going to use some advance functions which are not available in 1.0.  <xsl:template match="/">     <ns0:cacheData>       <ns0:differenceTime>         <xsl:call-template name=" timeDifference ">           <xsl:with-param name="date1" select="xp20:current-dateTime()"/>           <xsl:with-param name="date2" select="/ns0:cacheData/ns0:inserDateTime"/>         </xsl:call-template>       </ns0:differenceTime>     </ns0:cacheData>   </xsl:template>   <xsl:template name=" timeDifference "> ...

NTLM based SOAP Implementation in OSB

Hello Everyone, Today i am going to discuss how we can invoke a NTLM based SOAP service into OSB, Oracle SOA 12C have this feature in-built but you can use it only when you have env up to date with latest patch. Here i am going to discuss how we can do it in OSB. There is no direct way to do it in OSB too but with help of JAVA HTTP we can do it. Create a JAVA project in Eclipse. Import below three jars and attach them in build path so it can be used as class path. Java class Code: package com.teamshare.java.client.http; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.StringRequestEntity; public class TeamShareClient { public TeamShareClient() { } public static void main(String[] args) { ...

Oracle JCA Adapter for Microsoft Message Queueing

Hello, In Oracle SOA 12C, Oracle added few new adapters which can be used across with BPM/BPEL/OSB components. One of them is "Microsoft Message Queueing".  Microsoft Message Queuing is similar to weblogic JMS queues, difference is it's a Microsoft technologies. Microsoft Message Queuing provide most of the all functionalities and use case implementation which are provide by JMS queues. During the design of SOA applications it is inevitable that from time to time you will need to interface with Microsoft-based applications. While technologies like SOAP and REST do a great job when  request-reply  communication is needed, most people struggle when a  messaging-based  communication is required. This blog will present two approaches to get messaging working between Microsoft and  SOA Suite 12c . Before going to implementation part, let c what is it and why we should use it. What is MSMQ: Microsoft Message Queueing (MSMQ) is a message ...