Tuesday, July 17, 2012

Oracle SOA Enable or Disable endpoint test of web service

Sometimes it is required to disable testing of web service through the browser. This can be achieved by setting "Endpoint Test Enabled " to False from the Enterprise manager.

1.Login to the Enterprise Manager and open the composite.

2.From the context menu of the project navigate to Service/Reference properties and then the service.This will open the properties tab of the composite.





3.Change the "Endpoint Test Enabled " to False.



4.Click Apply. Now you should be getting 403 forbidden error if the web service URL is opened in the browser.

Tuesday, July 10, 2012

Getting JCA header property while invoking DB Adapter from Spring Bean

We had a requirement of calling a DB Adapter from the spring bean. Also the DB adapter should connect to different databases that had same table structure and the database to connect will be manipulated at the run time. If we are invoking DB adapter from BPEL we could have achieved this by setting the  header property of invoke activity as below.






When we are calling DB adapter from Spring Bean this need to be set in invoke activity of the bean and Oracle SOA Suite provides  predefined spring beans to get the values in the bean.

headerHelperBean  -- For getting and setting header properties
instanceHelperBean --  For getting the information of running instance like id & DN


The following properties need to be injected through the spring context file.


<property name="headerHelper" ref="headerHelperBean"/><property name="instanceHelper" ref="instanceHelperBean"/>

And the value can be set in the spring bean as follows.

headerHelper.setHeaderProperty("jca.db.XADataSourceName",arr[3]);


Tuesday, June 5, 2012

Unable to login to OAM 11g Console after LDAP Authentication Module Is Changed To Use a New Identity Store

We were unable  login to the OAM console  after changing the identity store used by the LDAP authenication scheme. In our case it was IdentityStore1  and got changed to ADStore. So we had to revert the values in oam-config.xml to login to the console  again.

Weblogic server maintains multiple back ups of the file in the below location.


DOMAIN_HOME/config/fmwconfig/oam-config.xml


We found there was a backup file existing  before the change happened. So by restoring the file and restarting the servers we were able to login to the console.

If you cannot find the any backup of the file in the folder just edit the oam-config.xml and setting the correct ldap id. For example,



 <Setting Name="ldapid" Type="xsd:string">UserIdentityStore</Setting>

Tuesday, February 15, 2011

Simple DVM sample in SOA 11g

DVM enables you to map from one vocabulary used in a given domain to another vocabulary used in a different domain.In this post we will go through how to create a light weight lookup service using DVM and mediator.In this example the service will return Nationality based on the country name.

1.Create a new SOA project with mediator.



2.Create a mediator with synchronous interface based on the below schema.


 <?xml version="1.0" encoding="UTF-8"?>  
 <schema attributeFormDefault="unqualified"  
       elementFormDefault="qualified"  
       targetNamespace="http://com.sample/LookUpUtilProcess/v1.0"  
       xmlns="http://www.w3.org/2001/XMLSchema">  
       <element name="process">  
             <complexType>  
                   <sequence>  
                         <element name="country" type="string"/>  
                   </sequence>  
             </complexType>  
       </element>  
       <element name="processResponse">  
             <complexType>  
                   <sequence>  
                         <element name="nationality" type="string"/>  
                   </sequence>  
             </complexType>  
       </element>  
 </schema>  


3.Right click on the project -->New -->Domain Value Map(DVM)



4.Provide a name for the DVM and put the initial entries  as below.





5.More Domains and domain valus can be added by opening the .dvm file in jdeveloper


6.Open the mediator and click on and add "static routing rule "



7.Select "Echo"


8.Click on Assign and use the dvm:lookupValue method to get the value from DVM.



For example, dvm:lookupValue("Nationality.dvm","Country",$in.request/inp1:process/inp1:country,"Nationality","Nationality Not Found")


Usage: dvm:lookupValue(dvmLocation as string, sourceColumnName as string, sourceValue as string, targetColumnName as string, defaultValue as string, (qualifierColumnName as String, qualifierValue as string)*))


9.Deploy the project and Test it with different inputs.

10.The SOA Composer is available in the below URL. http://hostname:port/soa/composer


11.The DVM can be opened and value can be changed at runtime from the soa composer without moving objects.