Tuesday, December 17, 2013

Custom Message Throttling and Interface Management – Oracle BPEL



This post explain the details on Custom Message Throttling and Interface Management – Oracle BPEL/Oracle SOA Suite 11g



Custom Message Throttling and Interface Management.pdf



Thursday, December 12, 2013

Approaches to integrate Oracle SOA Suite with SalesForce.com



This post explain the different Approaches to integrate Oracle SOA Suite with SalesForce.com.



Integrate Oracle SOA With SalesForce.pdf



Tuesday, December 10, 2013

Modifying the Request Headers of a OSB Business Service

Sometimes we may required to change the request header values eg. Content-Type and Accept etc for OSB Business Service request dynamically, this post will explain the steps to modify the header values for a Business Service request.

Login to sbconsole,Create the session and open the message flow of Proxy Service.


Edit the Route to Business Service and Click on add Request Action


Select the Action Type as Communication/Transport Headers and click on Add Headers



Select the Header for that the value needs to be changed and set the corresponding value, here i am changing the Content-Type to application/x-www-form-urlencoded. Click on Save All.


Activate the session and test the service, refer the traces of interface we can see the Content-Type of outbound got changed to application/x-www-form-urlencoded





Thursday, December 5, 2013

Dynamic endpoint configuration for OSB Business services

Sometimes we may required to change the OSB Business service endpoint dynamically.

The following are the steps to change the Business Service endpoints dynamically.

Login to sbconsole and create the session.

Open the Proxy Service Message Flow.


Click on the RouteTo_BusinessService and click on Edit Route


Select Request Actions and select URI


Enter the endpoint in the expression window - the same can be dynamically assigned from input variable


Click Save All and Activate the session.
Test the proxy service this will invoke the new endpoint.



Wednesday, December 4, 2013

Test the REST services using Chrome

This post will explain you how to test the REST services using chrome.

Install the REST Console Extension to Chrome.


Open REST Console


Here, i am invoking the REST enabled salesforce login service with OAuth.

Provide the Request URI, Content-Type and Language.
Select the Content-Type of Content Headers as application/x-www-form-urlencoded and provide the request payload.We can also add Authorization, Attachment and Headers to the request.


Click on GET/POST/PUT/DELETE button based on the request method, this will displays the response in the response section.






Tuesday, November 26, 2013

Creating JCA Adapters with Abstract WSDL - Oracle OSB

Oracle OSB provides the option to create JCA adapters to connect to different resources through Proxy Services and Business Services.

The JCA adapter needs to be created through JDevelper, JDeveloper creats a Abstract WSDL and a JCA adapter file.

When creating Busines Service through eclipse, eclipse provides the option to generating the service by right clicking the JCA file.

But through OSB console, we will not be able to generate the Business Service with the Abstract WSDL(WSDL Web Service)  because it will not have any binding or service defined.

If we are adding the binding/service to the abstract wsdl and creating the Business servive the following exception will be thrown




An error occured while validating JCA transport endpoint properties, exception: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: Please specify a Service. Choices are: {{http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP}putFTP, {http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP}putFTP_ep} oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException:

To resolve this issue create a Concrete WSDL file with JCA transport binding and service(Import the Abstract wsdl), create the Business service based on this .

<?
xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP" name="putFTP-concrete" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/CRM61OM/Project1/putFTP" location="putFTP.wsdl"/>
<binding name="Put_ptt-binding" type="tns:Put_ptt">
<soap:binding style="document" transport="http://www.bea.com/wli/sb/transports/jca"/>
<operation name="Put">
<soap:operation soapAction="Put"/>
<input>
<soap:body use="literal"/>
</input>
</operation>
</binding>
<service name="putFTP-service">
<port name="putFTP-port" binding="tns:Put_ptt-binding">
<soap:address location="jca://eis/ftp/AAAProductPub"/>
</port>
</service>
</definitions>


Wednesday, October 30, 2013

Weblogic Managed server status struck in STARTING

We faced the issue while starting the weblogic managed server, the status of the server struck in STARTING.

W could not able to find a valid error messages in the log files

Managed Server Log File:

<30-Oct-2013 11:13:29 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING> 

No logs are getting printed after this.

Node Manager Log File:

<30-Oct-2013 11:09:44> <INFO> <SOACoreDomain> <MS1> <Server failed during startup so will not be restarted>
<30-Oct-2013 11:09:44> <WARNING> <Exception while starting server 'MS1'>
java.io.IOException: Server failed to start up. See server output log for more details.
      at weblogic.nodemanager.server.AbstractServerManager.start(AbstractServerManager.java:200)
      at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:23)
      at weblogic.nodemanager.server.Handler.handleStart(Handler.java:604)
      at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:121)
      at weblogic.nodemanager.server.Handler.run(Handler.java:71)

      at java.lang.Thread.run(Thread.java:662)

The root cause of this issue is somehow the ldap directory of the server got corrupted.

To resolve this issue:
  •  Kill the managed server 
  •  Remove the ldap folder from the following location  <<DOMAIN_HOME>>/servers/<<Managed Server>>, this file will be auto generated while restarting the server.
  • Restart the server



Monday, October 21, 2013

Tracking the messages in Oracle OSB

This blog will explain how to track the message for a Oracle OSB flow with unique key.

In oracle OSB we can assign a Report key to the proxy service and based on this key the messages can be tracked.

I have developed a proxy service based on business service that invokes a Employee BPEL, this blog will explain how to track the employee messages with employee id.

Open project in OSB console and also create a session

Click on View Message Flow of proxy service


Click on EmployeePS and Add Pipeline Pair


Add a stage on Request Pipeline and Edit the stage



Add a Report action


Configure the expression, Key Name and Key Value(Selected from ) as shown below, the Key Value can be selected from expression Editor.





Save and Activate the session.

Tracing the Message:

Initiate the Employee Proxy service through Test Console



Click on Operations and click on Message Reports and enter the key and value this will display all the instances of messages with this key

Click on Report Index Empid=24 and click on Detail in the Report Body section, this will display the input message to the service




Thursday, October 17, 2013

ORABPEL-05250 Error - JDeveloper Part1

I faced a strange ORABPEL-05250 issue while deploying the composite to Oracle SOA Suite Server through JDeveloper.

The composite was successfully build in JDeveloper but during deployment to the server received the following exception.

[03:59:18 PM] Sending internal deployment descriptor
[03:59:18 PM] Sending archive - sca_SFDCOT_Invoker_rev1.0.jar
[03:59:38 PM] Received HTTP response from the server, response code=500
[03:59:38 PM] Error deploying archive sca_SFDCOT_Invoker_rev1.0.jar to partition "CRMASYNC" on server AdminServer [http://localhost:8000] 
[03:59:38 PM] HTTP error code returned [500]
[03:59:38 PM] Error message from server:
There was an error deploying the composite on AdminServer: Error occurred during deployment of component: SFDCOT_Invoker to service engine: implementation.bpel, for composite: SFDCOT_Invoker: ORABPEL-05250

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/oracle/as01/fmw/config/admin/domains/SOACoreDomain/servers/AdminServer/dc/soa_b3d3a863-3515-4d6d-9b7f-0d0c7d1977a6"; the exception reported is: java.lang.Exception: BPEL 1.1 compilation failed

ORABPEL-05250 exception can occur for number of reasons . After a long struggle( tried removing the partner links one by one) received the actual error

There was an error deploying the composite on AdminServer: Error occurred during deployment of component: SFDCOT_Invoker to service engine: implementation.bpel, for composite: SFDCOT_Invoker: ORABPEL-09705

Could not initialize variable.
An error occurs while initializing BPEL variable inputVariable; the schema processor cannot find the element {http://xmlns.oracle.com/pcbpel/adapter/db/top/SFDCOT_POLLING_V}SfdcotPollingVCollection in the following schemas: oracle.fabric.common.wsdl.SchemaManager@7eb126f4.
The XSD element on which the variable was based was not properly defined in XSD or the WSDL.

Ensure that the element named in the error message is valid in the XSD or the WSDL.

The issue is due to schema name in the wsdl file is wrongly specified(wrong case) even though the schema name was wrongly specified in wsdl the composite was able compile and build successfully in JDeveloper installed in windows but failed while deploying to the server running in UNIX, this is due to case sensitive nature of file names in UNIX OS


After correcting this issue the composite got deployed successfully.



Wednesday, October 16, 2013

The WSDL is not semantically valid: The element or type specified for part'payload' in message cannot be found in any schemas referenced by this wsdl - Oracle OSB

While creating the WSDL resource in OSB with inline schema refereed to create the message types we may receive the following exception even though the wsdl is valid

An error occurred creating the resource:
The WSDL is not semantically valid: The element or type specified for part'payload' in message '{http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement}PositionEntitlementRequestMessage' cannot be found in any schemas referenced by this wsdl.


WSDL File:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>
   <xsd:complexType name="DT_EntitlementStatus">
    <xsd:annotation>
     <xsd:documentation xml:lang="EN">Schema for Entitlement Message</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
     <xsd:element name="Record">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element name="header">
         <xsd:complexType>
          <xsd:sequence>
           <xsd:element name="applicationId" type="xsd:string"/>
           <xsd:element name="transactionId" type="xsd:string"/>
           <xsd:element name="messageId" type="xsd:string"/>
           <xsd:element name="messageHistory" type="xsd:string"/>
           <xsd:element name="tracingId" type="xsd:string"/>
          </xsd:sequence>
         </xsd:complexType>
        </xsd:element>
        
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
    </xsd:sequence>
   </xsd:complexType>
  </xsd:schema>
 </wsdl:types>
 <wsdl:message name="PositionEntitlementRequestMessage">
  <wsdl:part name="payload" element="client:MT_EntitlementStatus"/>
 </wsdl:message>
 <wsdl:portType name="PositionEntitlement">
  <wsdl:operation name="process">
   <wsdl:input message="client:PositionEntitlementRequestMessage"/>
  </wsdl:operation>
 </wsdl:portType>

</wsdl:definitions>

The issue is the namespace prefix client is not able to access the element MT_EntitlementStatus.

To resolve this issue add the the targetNamespace attribute in schema definition as shown below

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SAPOM_PositionEntitlement"
                  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:client="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement"
                  xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
 <wsdl:types>
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"  targetNamespace="http://www.tr.com/ns/2013/10/14/SAP/EAI/AAALM/LicenseManagement">
   <xsd:element name="MT_EntitlementStatus" type="client:DT_EntitlementStatus"/>



Thursday, September 12, 2013

Common customization file to deploy OSB services to different environments

The customization file can be used to customize the OSB services.
This post will explain how to use the common customization file to customize the OSB services.

1. Create a environment specific property files with the end point details ex Dev_build.properties

# SFDC Details
sfdc.protocol=http
sfdc.host=10.23.23.11

siebel.protocol=http
siebel.host=10.23.23.12


2. Common customization file

To customize the end point details for the business service, we have to change the Service URI and Service URI Table.
we have to tokenize the endpoint details so that the values can be replaced from the environment specific file.

For each new OSB service generate the customization file and copy the required sections(mainly <cus:envValueAssignments> of Service URI and Service URI table <cus:envValueAssignments>) to the common customization file.

<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes">
  <cus:customization xsi:type="cus:EnvValueCustomizationType">
    <cus:description/>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@sfdc.protocol@://@sfdc.host@/services/service1</xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tableElement xmlns="http://www.bea.com/wli/sb/transports">
          <URI>@sfdc.protocol@://@sfdc.host@/services/service1</URI>
          <weight>1</weight>
        </tableElement>
      </xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@siebel.protocol@://@siebel.host@/eai_enu/start.swe</xt:value>
    </cus:envValueAssignments>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tran:tableElement xmlns:tran="http://www.bea.com/wli/sb/transports">
          <tran:URI>@siebel.protocol@://@siebel.host@/eai_enu/start.swe</tran:URI>
          <tran:weight>1</tran:weight>
        </tran:tableElement>
      </xt:value>
    </cus:envValueAssignments>

  </cus:customization>


 <cus:customization xsi:type="cus:FindAndReplaceCustomizationType">
    <cus:description/>
    <cus:query>
      <xt:resourceTypes>BusinessService</xt:resourceTypes>
      <xt:envValueTypes>Service Retry Iteration Interval</xt:envValueTypes>
      <xt:envValueTypes>Service URI Weight</xt:envValueTypes>
      <xt:envValueTypes>Service Retry Count</xt:envValueTypes>
      <xt:envValueTypes>Service URI</xt:envValueTypes>
      <xt:refsToSearch xsi:type="xt:ResourceRefType">
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:refsToSearch>
      <xt:refsToSearch xsi:type="xt:ResourceRefType">
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:refsToSearch>
      <xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources>
      <xt:searchString>Search String</xt:searchString>
      <xt:isCompleteMatch>false</xt:isCompleteMatch>
    </cus:query>
    <cus:replacement>Replacement String</cus:replacement>
  </cus:customization>
  <cus:customization xsi:type="cus:ReferenceCustomizationType">
    <cus:description/>
  </cus:customization>
</cus:Customizations>


3. Execute the below ant script with the corresponding environment name to replace the token values in the customization file.

<?xml version="1.0" encoding="iso-8859-1"?>
<project name="replacetokens" default="set.build.properties">
  <property environment="env"/>
  <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
      <pathelement location="../lib/ant-contrib/ant-contrib-1.0b3.jar"/>
    </classpath>
  </taskdef>
 <target name="set.build.properties">
  <copy file="${basedir}/tokenized_customization_file.xml" tofile="OSB_customization_file.xml">
    <filterchain>
    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
            <param type="propertiesfile" value="${basedir}/${env.EAI_ENV_TYPE}_build.properties"/>
            <param type="tokenchar" name="begintoken" value="@"/>
            <param type="tokenchar" name="endtoken" value="@"/>
    </filterreader>
    </filterchain>
    </copy>

 
   </target>
</project>

This will generate OSB_customization_file.xml with the actual values, this file can be used while deployment or after to customize the OSB services.



Monday, August 19, 2013

Issues while executiing the WLST script to customize the OSB


You may be receiving some of the below issues while executing the WLST script to customize the OSB projects.

ImportError: no module named wli: Make sure $OSBHOME/lib/sb-kernel-api.jar is added into the CLASSPATH.

ImportError: no module named customization: Make sure $OSBHOME/modules /com.bea.common.configfwk_1.5.0.0.jar added into the CLASSPATH.

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean: Make sure $OSBHOME/lib/sb-kernel-impl.jar added into the CLASSPATH.

 CLASSPATH=$CLASSPATH:$OSBHOME/modules/com.bea.common.configfwk_1.5.0.0.jar:$OSBHOME/lib/sb-kernel-api.jar:$OSBHOME/lib/sb-kernel-impl.jar;export CLASSPATH




Customizing the OSB Service through WLST script

This post will explain how to Customize the OSB Service through WLST script

The below WLST script will help us to run the OSB customization file.

import sys
from java.io import FileInputStream
from com.bea.wli.config.customization import Customization
from com.bea.wli.sb.management.importexport import ALSBImportOperation
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
from com.bea.wli.sb.management.configuration import SessionManagementMBean

def customizeOSBService(customizationFile):
    SessionMBean = None
    try:
        connect('weblogic', 'welcome1', 't3://localhost:8000')
        domainRuntime()
        sessionName = String("Customization"+Long(System.currentTimeMillis()).toString())
        SessionMBean = findService("SessionManagement", "com.bea.wli.sb.management.configuration.SessionManagementMBean")
        SessionMBean.createSession(sessionName)
        OSBConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
        print 'Loading customization File', customizationFile
        iStream = FileInputStream(customizationFile)
        customizationList = Customization.fromXML(iStream)       
        OSBConfigurationMBean.customize(customizationList)
        SessionMBean.activateSession(sessionName, "Complete customization using wlst")
        disconnect()

    except:
        print "Unexpected error:", sys.exc_info()[0]
        if SessionMBean != None:
            SessionMBean.discardSession(sessionName)
        raise

def main():
       
        customizeOSBService('D:\Albin\ALSBCustomizationFile.xml')           
        print 'Successfully Completed customization'   
main()

Customization File:

Customization file will help us to modify the environment specific values for a OSB project.
The previous post can be referred for more details on customization file.

Modify the  environment specific values in the customization file.

Running the Script:
Login to the server and copy the wlst script and the Customization file to some location.
Execute the below two commands

CLASSPATH=$CLASSPATH:$OSBHOME/modules/com.bea.common.configfwk_1.5.0.0.jar:$OSBHOME/lib/sb-kernel-api.jar:$OSBHOME/lib/sb-kernel-impl.jar;export CLASSPATH

wlst.sh /home/eaiapp/Albin/OSBCustomization.wlst

Before executing the first command change the com.bea.common.configfwk_1.5.0.0.jar file version according to your environment.

After successful execution verify the service from OSB Console

  DOWNLOAD OSBCustomization.wlst



Saturday, August 17, 2013

OSB Service customization through console

This post will explain how to perform OSB customization through console


OSB customization will help us to change the environment specific properties for OSB resources.
There are multiple options to customize the OSB resources.

 Find & Replace:

Find And Replace option help us to find and replace the environment specific values. For example replacing the service URI of the service.
Login to OSB console (http ://<< host name>> :<< port>>/sbconsole) and Create the session
Click on System Administration and Find & Replace under Customization


Enter the find value also provide Find in variable type, Located in project if required and click on Find button. This will display the find results in the bottom.

Enter the value to be replaced and click on Replace All.



Activate the session and verify the service for the replaced value








Customization File:

Customization file will help us to change the environment properties of a multiple resources at the same time.
Creation of customization file – Click on system Administration and Create Customization File under customization.
Select the projects to which the customization file need to be generated (if we select all the projects the same customization file will have the configuration for all the projects) and click on Create File.


The generated Customization file will have the environment properties configuration for the selected projects.



Modify the Customization file properties according to the environment.
Execution of Customization File
Login to OSB console and create a session.
Click on System Administration and Execute Customization File under Customization
Browse the Customization file from the local and Click On Next

Click on Execute button and Activate the session after successful Execution.
Verify the changes applied for the projects.










Contact Form

Name

Email *

Message *