Skip to main content

Posts

Showing posts with the label routing

PFX Certificate key based secured REST API Invocation in OSB with JAVA

Hello, Today we are going to see how we can invoke a REST API which is secured with private key & certificate which requires two way SSL for successful invocation. Before starting development what we need: Certificate.pfx file This PFX file contain a CERTIFICATE AND KEY, which will be used for two way SSL REST API URL like "https://SERVERURL/URL/connect/token" JAVA implementation: We need to use below external JAR's for making HTTP Call. Below is sample JAVA code for same: package com.api.client; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URL; import java.security.KeyStore; import java.security.SecureRandom; import java.util.logging.Logger; import javax.net.ssl.HttpsURLConn...

Dynamic Routing in OSB 12C

Dynamic Routing in OSB cab be used when the BusinessService endpoint required to be determine at runtime in message flow. Consider a scenario where OSB has to route the incoming requests to 2 different services based on the CustomerType element value sent in the payload. So create a XQuery resource with the following contents. Observe that we are using the absolute path of business service in configuration as required by dynamic routing. Following is the XML schema that we use:>>  Customer.xsd <?xml version="1.0" encoding="windows-1252" ?> <xsd:schema targetNamespace="http://xmlns.oracle.com/schema/Customer" xmlns:xsd="http://www.w3.org/2001/XMLSchema"             xmlns:ns1="http://xmlns.oracle.com/schema/Customer">   <xsd:complexType name="Customer">     <xsd:sequence>       <xsd:element name="CustomerId" type="xsd:string"/>       <xsd:elemen...