Wednesday, June 13, 2012

Create/add Custom Xpath to OSB/osb eclipse
1.       Create java project with point 2 and 3 (it should have .properties and xml file).
2.       Create your java class and method to perform your operation.
3.       Add properties and xml
Create common-functions.Properties file with below two lines.
%OSB_FUNCTIONS%=Service Bus Functions
%FUNC_COMMON_COMMENT%=Utility function methods
Create common-functions.xml as,
xml version="1.0" encoding="UTF-8"?>
<xpf:xpathFunctions xmlns:xpf="http://www.bea.com/wli/sb/xpath/config">
    <xpf:category id="%OSB_FUNCTIONS%">     
        
         <xpf:function>
                <xpf:name>retrunStrxpf:name>
                <xpf:comment>%FUNC_COMMON_COMMENT%xpf:comment>
                <xpf:namespaceURI>http://www.test.com/xquery/Common-functions/testxpathxpf:namespaceURI>
                <xpf:className>com.service.util.TestCustomXpathxpf:className>
                <xpf:method>java.lang.String retrunStr(java.lang.String)xpf:method>
                <xpf:isDeterministic>falsexpf:isDeterministic>
                <xpf:scope>Pipelinexpf:scope>
                <xpf:scope>SplitJoinxpf:scope>
         xpf:function>
        
    xpf:category>
xpf:xpathFunctions>

4.       Export the above java project as jar file.
5.       Copy the jar, common-functions.Properties and common-functions.xml files into


\Oracle\Middleware\Oracle_OSB1\config\xpath-functions
6.       Restart the eclipse, now your custom function is ready to use it in OSB (xquery).
7.       In OSP add the name space, http://www.test.com/xquery/Common-functions/testxpath which is given in common-functions.xml and call your custom function as, tst:returnStr("test”)
8.       Done.



Thursday, May 17, 2012

Xquery to handle default namespace






1234



25



0

Success











xquery to get the value of ErrorCode and ErrorMessage from above xml.

The Response element has name space as http://abc.xyz.com/test/schemas and it doesn’t have prefixed so all the elements under Response element prefix with some default namespace. To cover up this write xquery as

data($body/*:Response/*:DetailResponse/*:Error/*:ErrorCode)

data($body/*:Response/*:DetailResponse/*:Error/*:ErrorMessage)



Tuesday, April 17, 2012

Step to setup Meta Data Store (MDS) in Weblogic server using Jdeveloper – SOA 11g


 It helps to reuse of SOA Artifacts such as wsdl, xsd, and fault policy, ect… 

MDS connection can be “File Base MDS” or “DB Based MDS”.

Under “/ integration/seed/” create dir as “apps” if it is not there.  Under apps create your own dir and store your xsd, wsdl, ect… it should match your schema structure.

Steps to create SOA_MDS connection in Jdeveloper, Go to New à Connection àSOA-MDS Connection,

 
In “SOA-MDS Connection” screen select connection Type “DB Based MDS” or “File Based MDS”

To use the MDS xsd or wsdl file add an entry in Application Resources à Descriptors à ADF-META-INFà adf-config.xml

  
         namespace metadata-store-usage="mstore-usage_2" path="/apps/bs"/
       

property value="C:/Oracle/Middleware/jdeveloper/integration"                       
 name="metadata-path"
Go to “Application Resources” and open adf-config.xml file 

          


In composite refer as “oramds:/apps/bs/xsd/Test.xsd”


Deploy MDS Repository to Weblogic Server.
Create SOA Application and SOA project with empty composite. In SOA Project, under “SOA content” create your own directory structure to arrange you xsd, wsdl and fault policy files, etc…

To deploy the MDS, right click on MDSApplication and select Deploy

In deployment Action Screen selects “Deploy to SOA Bundle” and finish the deployment.

It creates .zip file under your application location as Boundle.zip.

Deploy this file into corresponding em console partition.