Thursday, July 24, 2014

Cipher not initialized exception while invoking the Salesforce service through OSB

Cipher not initialized exception while invoking the Salesforce service through OSB

We are getting the "Cipher not initialized" exception wile invoking the Salesforce services through OSB.


We are able to invoke the login.salesforce.com URL successfully and able to receive the session id, also this exception was thrown only for a particular sandbox but the all other sandbox invocation is successful.

The "Cipher not initialized" exception will be thrown when there is no common Ciphers available between the client and server while negotiating the SSL communication.

We have raised a case with Salesforce regarding this and receive the response as "We recently upgraded our Cipher suites for SSL. To resolve the issue upgrade latest version of Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files- 6 for JDK1.6 on middleware."

After upgrading the Unlimited Strength Jurisdiction Policy Files in all the servers nodes we are able to invoke the service successfully.

Steps to resolve the issue

  • Download the Unlimited Strength Jurisdiction Policy Files from http://www.oracle.com/technetwork/java/javase/downloads/index.html(Under Additional Resources" section), for java 1.6 use http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
  • Unzip the downloaded zip 
  • Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security in all the OSB nodes.
  • Restarts the servers.
Now you will be able to invoke the service successfully.


Thursday, May 22, 2014

The selected WSDL contain a direct binding but seems to be of the wrong type - Oracle SOA Suite

The selected WSDL contain a direct binding but seems to be of the wrong type - Oracle SOA Suite

You will be receiving the message "The selected WSDL contain a direct binding but seems to be of the wrong type. Looking for Oracle Service Bus type.Please check your WSDL selection" while trying to create the direct binding to invoke the OSB service.


This message says the OSB proxy service is not configured with SB transport.
Configure the OSB Proxy service with the SB transport to invoke the same from SOA composite through Direct Binding.

When looking up the OSB service from JDeveloper SOA Resource Browser, the Proxy will be shown as direct for SB transport services.



Friday, May 2, 2014

Transforming the REST XML message to SOAP message - OSB

Transforming the REST XML message to SOAP message - OSB

This post will explain how to Transform the REST XML message to SOAP message in OSB

While receiving the response from REST interface  with the content type as application\xml, the input XML will be plain without the target namespace specified.
But if you are invoking the BPEL with this message the BPEL cant perform any xpath operations on this message without target namespace.The target namespace should be added to the message.

The XSLT can be used to add the name space to the XML message but before performing this operation the SOAP envelope of the body variable should be removed
After removing the namespace the XML should be assigned to the body variable to send to target system.

Follow the below steps to achieve the same:

Remove SOAP Envelope:

The below XSLT will help as to remove the namespace from the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resource
Assign the output to a temp variable - var1.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()" />
        </xsl:copy>
      </xsl:template>

      <xsl:template match="soapenv:*">
        <xsl:apply-templates select="@* | node()" />
  </xsl:template>
</xsl:stylesheet>




Transforming the SOAP message to REST XML message- OSB

Transforming the SOAP message to REST XML message- OSB

While invoking the REST interface from OSB with the content type defined as application\xml, the target system will expect the simple XML message without the target namespace specified.

The XSLT can be used to remove the name space from SOAP message but before performing this operation the SOAP envelope of the body variable should be removed
After removing the namespace the XML should be assigned to the body variable to send to target system.

Follow the below steps to achieve the same:

Remove SOAP Envelope:

The below XSLT will help as to remove the namespace from the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resource
Assign the output to a temp variable - var1.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()" />
        </xsl:copy>
      </xsl:template>

      <xsl:template match="soapenv:*">
        <xsl:apply-templates select="@* | node()" />
  </xsl:template>
</xsl:stylesheet>

Removing Namespace:

The below XSLT will help as to add the target namespace to the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resouce  to remove the namespace from the variable var1
Assign the ouput to a temp variable - var2

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="*">
        <xsl:element name="{local-name()}">
            <xsl:apply-templates select="@* | node()" />
        </xsl:element>
    </xsl:template>
    <xsl:template match="@*">
        <xsl:attribute name="{local-name()}">
            <xsl:value-of select="." />
        </xsl:attribute>
    </xsl:template>
    <xsl:template match="text() | comment() | processing-instruction()">
        <xsl:copy />
    </xsl:template>
</xsl:stylesheet>

Assign the content of var2 to body:

Add replace activity to replace the node contents of body with var2




Sunday, April 27, 2014

Purging the Oracle Service Bus(OSB) Alerts

Purging the Oracle Service Bus(OSB) Alerts

The History of  Alerts in OSB can be purged through OSB console.

Make sure you are purging the alerts regularly otherwise you may face some of the  the issues like
  • The server will take more time to start
  • The alert dashboard will become very slow.
Login to sbconsole and click on Operations-->Monitoring-->Dashboard
Click on Extended Alert History


Click on "Purge SLA Alerts History"