Thursday 22 September 2016

Data Masking Using XSLT

Requirement :

I have a requirement for data masking as we receive request data like 2.1, 32.2 and response should be in decimal (4.2) like 0002.10, 0032.20.

Solution :

We have masking function in XSLT But as per the above requirement we have function format-number (). 

Syntax :

format-number ($RequestXpath, '0000.00' )


 <processResponse>
         <result>
            <xsl:value-of select="format-number (/process/input, &quot;0000.0&quot; )"/>
         </result>

   </processResponse>

Request :

<process>
   <input>2.1</input>
</process>

Response :

<processResponse>
   <result>0002.10</result>
</processResponse>

Thanks!! 

Thursday 30 June 2016

UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization

In this post, i am going to explain about an issue and solution which i faced while integrating salesforce in SOA 12c.

Issue :

To integrate salesforce in SOA 12c, we need to configure Salesforce adapter which required credentials like username, password & security token. But i am not able to get the metadata of salesforce and got an error like UNSUPPORTED_CLIENT:


Solution :

The problem for this issue is salesforce has disabled TLS 1.0 version in their organization. So it will support for TLS 1.1 or higher version. we have to update the TLS security level to TLS 1.1 or higher version in 12c Jdeveloper and weblogic.

Add below property in jdev.conf for get access for salesforce integration in Jdeveloper 12c.

AddVMOption -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2

Add the same property in setDomainEnv.cmd file to get access for salesforce integration in weblogic 12c.

Restart Jdeveloper and SOA server.

Thanks !!


Thursday 31 March 2016

File Transfer Based On File Size in SOA 11g



This project is used to transfer large number of files from source directory to destination directory with their same name and format of the files and based upon their file size.

Steps to create the composite are as follows:
1. Create three File adapters. One for read operation and remaining two for Write operation.
2. Configure these File adapters with proper File path location.
3. While Configuring File adapters make sure to check the Native format Translation is not required (Schema is opaque).
When that is checked, Any file(.txt,.xm,.csv) can be passed between directories.




4. Create a BPEL component with Define Service later template and connect the File adapters to BPEL.




5. Double click on BPEL process. Drag and drop receive activity and create instance with proper names for the input and output variables in receive activity.
6. Create a two more variables with string data type and name it as FileName_Variable and  FileSize_Variable.
7. Double click on receive activity and go to properties.
8. Add these variables as the adapter property values for jca.file.filename and jca.file.size.


9. After receive activity, Drag and drop switch activity and configure the switch with scenario like
If the file size is equal or more than 2000 bytes then, the file should transfer to one location.
Otherwise the file should transfer to another location.
10. Drag and drop the invoke activity for both the scenarios and invoke the file adapters to write the files.
11. Drag and drop the assign activity for both the scenarios and map the opaque elements from receive  output variable to file adapter input variables.




12. Double click on invoke activity and go to properties then, add the FileName_Variable variable as the  value for the jca.file.name property name and click on apply button.



13. Deploy and test it by moving some files into file reader path location.

Thank you.. !!