Skip to main content

Posts

Swagger API document from Any WADL & Schema in Oracle SOA

Hi everyone, Hope everyone is doing well these days, Recently i started a project work over how to generate swagger API document for your any REST API, In case if you don't know what is swagger please go and check " https://swagger.io/tools/swagger-editor/ ". It's a great and easy to use tool which will help to create user friendly, human readable form API documentation with extension for generating API client in different languages with capability of testing your API from same. What is swagger editor, Design, describe, and document your API on the first open source editor fully dedicated to OpenAPI-based APIs. The Swagger Editor is great for quickly getting started with the OpenAPI (formerly known as the Swagger Specification) specification, with support for Swagger 2.0 and OpenAPI 3.0.  What benefits you will get by using swagger, Runs Anywhere, The Editor works in any development environment, be it locally or in the web. Smart Feedback, Validate you
Recent posts

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

ParseEscapedXML Function In Oracle BPEL XSLT Is Throwing Parsing Error For Special Character &

The ampersand escape sequence "&" in a Database Record/XML Payload is being converted to '&amp;' by the BPEL composite.  This results in the XSLT transformation code throwing an oracle.xml.parser.v2.XMLParseException error/exception when the parseEscapedXML method is invoked against the data. The parseEscapedXML method was deprecated in in 12C and should not longer be used. It has been replaced by the new method oraext:parseXML. There is a know bug in the oraext:parseXML method that was address in patch 21377740. The fixes that were made in 21377740 where incorporated into the  12.2.1.0.0 GA release, thus there no patch needed  for the issue.   Note: No backport fix for 12.1.3 was released

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 140529.0700.0211) AT [TUE MAY 21 03:13:57 EDT 2019].-->   </oracle-xsl-mapper:schema>   <

String replace() function in BPEL XSLT

Write an XSLT template for string replace function and call this template whenever string replacement is required. Create your own Custom XPath function for String replacement that can be imported in JDeveloper and used across the whole developer team. Harness the capabilities of using Java classes in XSLT. This is the simplest method and I'll explain this in just 2 steps, attributed to its simplicity. Create a namespace in XSLT for the Java String class to be used (let's prefix this as  :strClass). Use replaceAll() function of the String class referenced above as highlighted under. And the job is done. <xsl:stylesheet version="1.0"   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   xmlns:strClass="http://www.oracle.com/XSL/Transform/java/java.lang.String">   <xsl:template match="/">     <xsl:value-of select="strClass:replaceAll($input, 'hello', 'HELLO')"/>   </xsl:template&g

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 recursively. ThreadCount:  If this property is avail

Hadoop Hive Session issue in weblogic data source

Hi Everyone, Recently i come with a requirement about Hadoop Hive integration in Oracle SOA, For same i wrote a blog which you can find on below link. https://oraclesoaosbbpmapi.blogspot.com/2019/03/hadoop-hive-data-base-fetching-records.html After successfully configuring hive in weblogic, We faced a new issue which is about connection. Before going deep about issue and solution let's see how HIVE DB manage connection on server side. when ever we make a data base connection for HIVE DB, it create an internal session and generates a session id which is valid for a specific period of time which is configured on server level. After that period of time Hive create a new session id and process the query. How weblogic data source manage connection: When we create a data source in weblogic, We define a connection pool size by which we can use existing connections which are not in use by any other resource by which weblogic minimize the connection cost. Issue due to