Quantcast
Channel: Indrayan's SOA Blog
Viewing all 62 articles
Browse latest View live

Understanding XSLT key function & it's Application

$
0
0
Brief of The <xsl:key> element:

It has 3 attributes name=name of the key, match=pattern or the node where the key is applicable, use= it is an expression, which is used to arrive at the value of the key for each of the nodes specified in the match attribute. <xsl:key> element must be a child of <xsl:stylesheet/>.


Syntax:

<xsl:key match="/xsdLocal: ListOfOrder/xsdLocal:Order/xsdLocal:ListOfOrderItem/xsdLocal:OrderItem" use="xsdLocal:ShippableFlag" name="TestKey"/>

This is the syntax of how to define a key. Here “TestKey” will applicable to node “OrderItem” and “ShippableFlag” element is value of the key for each of the nodes.


Key ( ) function:

Returns a node-set from the document, using the index specified by an <xsl: key> element.

Syntax:

key(string, object), here string=name of the key and object=condition or string to search for.
<xsl:for-each select="key('TestKey','Y')"/>

Grouping with key( ) & count( ):

<xsl: value-of select="count (key ('TestKey','Y'))"/> this will return the total number of “ShippableFlag” element matched by the key () function.

Grouping with Union & count & key:


If you want to get a list (without repeats) of the repeated IDs using the key () method, then you can use the usual:

Example document:

<ListOfOrder>
<Order>
<ListOfOrderItem>
<OrderItem>
<VolumeUpsellMessage>A</VolumeUpsellMessage>
<ShippableFlag>N</ShippableFlag>
</OrderItem>
<OrderItem>
<VolumeUpsellMessage>B</VolumeUpsellMessage>
<ShippableFlag>Y</ShippableFlag>
</OrderItem>
<OrderItem>
<VolumeUpsellMessage>C</VolumeUpsellMessage>
<ShippableFlag>N</ShippableFlag>
</OrderItem>
<OrderItem>
<VolumeUpsellMessage>D</VolumeUpsellMessage>
<ShippableFlag>Y</ShippableFlag>
</OrderItem>
<OrderItem>
<VolumeUpsellMessage>E</VolumeUpsellMessage>
<ShippableFlag>Y</ShippableFlag>
</OrderItem>
<OrderItem>
<VolumeUpsellMessage>F</VolumeUpsellMessage>
<ShippableFlag>N</ShippableFlag>
</OrderItem>
</ListOfOrderItem>
</Order>
</ListOfOrder>


Case 1: If we want the union of current node & 2nd element from the node set returned by key( ), then code will be like this :-


<xsl:for-each select="/xsdLocal:ListOfOrder/xsdLocal:Order/xsdLocal:ListOfOrderItem/xsdLocal:OrderItem">
<ns0:result>
<xsl:value-of select="count(.|key('TestKey',xsdLocal:ShippableFlag)[2])"/>
</ns0:result>
</ns0:result>
<ns0:result2>
<xsl:value-of select="xsdLocal:ShippableFlag"/>
</ns0:result2>
<ns0:result1>
<xsl:value-of select="xsdLocal:VolumeUpsellMessage"/>
</ns0:result1>
</xsl:for-each>

Target –xml will be like this:-

<ns0:XSL_keyPOCProcessResponse xmlns:ns0="http://xmlns.oracle.com/XSL_keyPOC">
<ns0:result>2</ns0:result>
<ns0:result2>N</ns0:result2>
<ns0:result1>A</ns0:result1>
<ns0:result>2</ns0:result>
<ns0:result2>Y</ns0:result2>
<ns0:result1>B</ns0:result1>
<ns0:result>1</ns0:result>
<ns0:result2>N</ns0:result2>
<ns0:result1>C</ns0:result1>
<ns0:result>1</ns0:result>
<ns0:result2>Y</ns0:result2>
<ns0:result1>D</ns0:result1>
<ns0:result>2</ns0:result>
<ns0:result2>Y</ns0:result2>
<ns0:result1>E</ns0:result1>
<ns0:result>2</ns0:result>
<ns0:result2>N</ns0:result2>
<ns0:result1>F</ns0:result1>
</ns0:XSL_keyPOCProcessResponse>


Case 2: In this case key('TestKey',xsdLocal:ShippableFlag)[2] will return 2nd element of node set by key( ) so that element C(ShippableFlag=N) and D (ShippableFlag=Y). Then count(.|key('TestKey',xsdLocal:ShippableFlag)[2])=1 means it will return those elements whose union with C , D is equals to 1.
A | C=2, B | D=2, C | C=1, D | D=1, E | C=2, F | C=2 so it will return only C | C, D | D.

Code fragment:

<xsl:for-each select="/xsdLocal:ListOfOrder/xsdLocal:Order/xsdLocal:ListOfOrderItem/xsdLocal:OrderItem[count(.|key('TestKey',xsdLocal:ShippableFlag)[2])=1]">

<ns0:result2>
<xsl:value-of select="xsdLocal:ShippableFlag"/>
</ns0:result2>
<ns0:result1>
<xsl:value-of select="xsdLocal:VolumeUpsellMessage"/>
</ns0:result1>
</xsl:for-each>

Target-xml:-

<ns0:XSL_keyPOCProcessResponse xmlns:ns0="http://xmlns.oracle.com/XSL_keyPOC">
<ns0:result2>N</ns0:result2>
<ns0:result1>C</ns0:result1>
<ns0:result2>Y</ns0:result2>
<ns0:result1>D</ns0:result1>
</ns0:XSL_keyPOCProcessResponse>




Advantages of ESB over BPEL

$
0
0

Objectve:

To have a comparison of use of Oracle ESB against Oracle BPEL

Overview of Oracle BPEL/ESB:

Below link provides concepts and overview of Oracle BPEL and Oracle ESB a

http://www.ibm.com/developerworks/websphere/library/techarticles/0803_fasbinder2/0803_fasbinder2.html

ESB basically have four major functions:

Message routing

Message transformation

Protocol mediation

Event handling

All these can be achieved through BPEL as well. Adding to these BPEL provides us

BPEL Process (to handle complex logic & orchestration)

Human Task

Rules

Better Error Handling & Monitoring

Then what’s the point of using ESB.Check below characteristics of both

ESB characteristics:

1.To route messages to multiple destinations

2.Low cost solution

3.High performance integration solution

4.Simple transformation containing no rules

5.Small product footprint and hence minimal overhead

BPEL Characteristics:

1.Orchestrate business processes

2.Complex transformations

3.Human workflow requirement

4.Long running and stateful processes

5.Better error handling and sensors monitoring

What we could identify is, ESB flows are transactional hence stateless, using mechanisms such as two-phase commit, so that the entire flow can be rolled back in the case of a failure, or committed in the case of success. Also ESB has a small product footprint and hence minimal overhead.

Given the stateless transactional nature of an ESB, high performance is a given. It's not uncommon for an ESB to handle millions of messages each day in a large organization.

Deciding which run-time to use

The first order of business is to look through the requirements, and decide if one of the choices is a better fit. For example, if a stateful process is required, one can immediately rule out the ESB. If on the other hand the requirement is to process a message transformation in under 0.2 seconds, clearly the ESB would be the choice.

One of the main strengths of an ESB is processing messages including the ability to handle greater complexity in the transformations. If the requirements call for one of the basic ESB functions, such as message routing, transformation or protocol mediation, an ESB would be the clear choice.

Another strength of an ESB is performance. An ESB is designed to be able to handle large volumes of messages. If, for example, the requirements say that there will be 200,000 messages per day, the ESB would clearly be the better choice.

For any Orchestration,Business logic,Human Task or Rule etc BPEL will be better choice.

Relation Between JVM MaxPermSize and HeapSize

$
0
0

ØOptions that begin with-Xare non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in subsequent releases of the JDK.

ØOptions that are specified with-XXare not stable and are not recommended for casual use. These options are subject to change without notice.

The allocation of Heap Size for the JVM at startup is done based on parameters given below:

JVM option

Meaning

-Xms

Initial java heap size

-Xmx

Maximum java heap size

-XX:PermSize

Intial java permanent space size

-XX:MaxPermSize

Maximum java permanent space size

With regards to the MaxPermSize, this argument adjusts the size of the "permanent generation." As I understand it, the perm gen holds information about the "stuff" in the heap. So, the heap stores the objects and the perm gen keeps information about the "stuff" inside of it.

Consequently, the larger the heap, the larger the perm gen needs to be.

In simpler term we can define the two parameters as given below:

ordinary heap = app objects
perm heap = app class definitions

The permanent generation is used to hold reflective data of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations."


Is
MaxPermSize is inclusive in Xmx?


Suppose one set JVM parameters as.......

-Xms3072M -Xmx3072M -XX:+AggressiveHeap -XX:MaxPermSize=1024M.........

Doubt Is:When we say MaxPermSize = 1024M does it mean that it is taken from
3072M that I set for Xms/Xmx ?

Answer is No, PermSize is additional to the -Xmx value set by the user on the JVM options. But MaxPermSize allows for the JVM to be able to grow the PermSize to the amount specified. Initially when the VM is loaded, the MaxPermSize will still be the default value (32mb for -client and 64mb for -server) but will not actually take up that amount until it is needed. On the other hand, if you were to set BOTH PermSize and MaxPermSize to 256mb, you would notice that the overall heap has increased by 256mb additional to the -Xmx setting.

Heap size does not determine the amount of memory your process uses

There are a number ofseparate memory pools in the JVM, whose maximum sizes are set separately.If you monitor your java process with an OS tool like top or taskmanager, you may see the amount of memory you use exceed the total amount you have specified for –Xmx and -XX:MaxPermSize. -Xmx limits the java heap size,and -XX:MaxPermSize limits java permanent space. However java will allocate memory for other things, including a stack for each thread. It is not unusual for the total memory consumption of the VM to exceed the value of Xmx + XX:MaxPermSize.

Parse xml data using plsql

$
0
0

Creating XMLType Table: Creating XMLType Columns

The XMLType column can be created like any other user-defined type column:
CREATE TABLE warehouse(
  warehouse_id NUMBER(4),
  warehouse_spec XMLTYPE,
  warehouse_name VARCHAR2(35),
  location_id NUMBER(4));

Insert data in Table

INSERT INTO warehouse VALUES 
   (       100, XMLType(
              '<Warehouse whNo="100"> 
<Building>Owned</Building>
</Warehouse>'), 'Tower Records', 1003);

Fetch Data from table using PL-SQL Block:

declare
    xmlt varchar2(1000);
begin
  SELECT 
  w.warehouse_spec.extract('/Warehouse/Building/text()').getStringVal() into xmlt  FROM warehouse w where w.warehouse_id =100;
  dbms_output.put_line('***'||xmlt);
end;

Insert data in Table(with namespace prefix)

INSERT INTO warehouse VALUES
   (       103, XMLType(
              '<ns2:ListOfOrder xmlns:ns2="http://siebel.com/OrderManagement/Order/Data" Language="ENU" Locale="English - United States" MessageId="" EnterpriseServerName="COXDEVINTent">
<ns2:Order>
<ns2:Account>KUCHARYK, ALEX</ns2:Account>
<ns2:AccountId>1-FLPTC</ns2:AccountId>
<ns2:AccountLoc>1-FLPTC</ns2:AccountLoc>
<ns2:ListOfOrderItem>
<ns2:OrderItem>
<ns2:ActionCode>Existing</ns2:ActionCode>
<ns2:AssetIntegrationId>1-FYCF8</ns2:AssetIntegrationId>
</ns2:OrderItem>
</ns2:ListOfOrderItem>
</ns2:Order>
</ns2:ListOfOrder>'), 'Tower Records', 1006);

Stored Proc to parse xmltype(with namespace prefix)

declare
   xmlt xmltype;
   doc       DBMS_XMLDOM.DOMDocument; 
  ndoc      DBMS_XMLDOM.DOMNode; 
  docelem   DBMS_XMLDOM.DOMElement;
  node      DBMS_XMLDOM.DOMNode; 
  childnode DBMS_XMLDOM.DOMNode; 
nodelist  DBMS_XMLDOM.DOMNodelist;
  buf       VARCHAR2(2000);
begin
  SELECT 
  w.warehouse_spec into xmlt  FROM warehouse w where w.warehouse_id =103;
  doc     := DBMS_XMLDOM.newDOMDocument(xmlt); 
ndoc    := DBMS_XMLDOM.makeNode(doc);
DBMS_XMLDOM.writeToBuffer(ndoc, buf);
--------
 docelem := DBMS_XMLDOM.getDocumentElement(doc);
nodelist := DBMS_XMLDOM.getElementsByTagName(docelem, 'AssetIntegrationId');
  node := DBMS_XMLDOM.item(nodelist, 0);
childnode := DBMS_XMLDOM.getFirstChild(node);
  -- Manipulate element
  DBMS_OUTPUT.put_line(‘Value of AssetIntegrationId:'||  DBMS_XMLDOM.getNodeValue(childnode));
  dbms_output.put_line('***'||xmlt.getStringVal());
end;

SOA Sync And Async Process Backend Processing

$
0
0

Synchronous Process Execution:

The following steps are performed:

  1. The client calls a request on the delivery service (this can also be a BPEL process).
  1. The synchronous flow starts. In this case, the first activity is a receive.
  1. The flow executes some activities, then encounters a checkpoint, which is abreakpoint activity (other breakpoint activities are receive, onMessage, wait, andonAlarm). Once the flow encounters this activity, the instance must be dehydrated.The assign following the checkpoint is processed by another thread in thebackground.
  1. The thread (the one from the client) goes back to the delivery service and waits forthe reply from the reply queue. This waiting is subject to the syncMaxWaitTime value. If this time is exceeded, then the client thread returns to the caller with a timeout exception.
  1. Another new background asynchronous thread picks up where the other thread left off. Itrehydrates the instance from the database, and executes the remaining activities.
  1. When the reply activity is executed, it puts the reply message in the reply queue.
  1. The reply queue now notifies any waiters that the reply message is available. If thewaiter has not timed out, it gets the message. If it has timed out, the message is notpicked up (note that the flow has completed normally).
  1. If the waiter has not timed out, it now has the reply message and returns to theclient with the message.

If the flow did not have a checkpoint, then step 2 processes all the activities, includingthe reply (which added the reply message to the queue). When the thread returns tothe delivery service, it waits for the reply. However, since the reply is already there, itreturns immediately and is not subject to the syncMaxWaitTime value.

In addition, the synchronous process saves itself when it is finished.

Asynchronous Process Execution:

From JMS & Db operation perspective

The sequence of events involved in the delivery of invoke messages is as follows:

  1. The client posts the message to the delivery service.
  1. The delivery service saves the invocation message to the invoke_message table.The initial state of the message is 0 (undelivered).
  1. The delivery service schedules a dispatcher message to process the invocationmessage asynchronously.
  1. The dispatcher message is delivered to the dispatcher through theafterCompletion() call. Therefore, the message is not delivered if the JTAtransaction fails.
  1. The dispatcher sends the JMS message to the queue. Places a very short JMS message in the in-memory queue(jms/collaxa/BPELWorkerQueue) in OC4J JMS. The small JMS message

triggers the WorkerBean in the downstream step.

  1. This message is then picked up by aWorkerBean MDB, which requests the dispatcher for work to execute. If the number ofWorkerBean MDBs currently processing activities for the domain is sufficient, thedispatcher module may decide not to request another MDB. The decision to request anDB is based on the following:

ØThe current number of active MDBs

ØThe current number pending (that is, where a JMS message has been sent, but an

MDB has not picked up the message)

ØThe value of dspMaxThreads

  1. MDB fetches the invocation message from the dispatcher.
  1. MDB passes the invocation message to Oracle BPEL Server, which updates theinvocation message state to 1 (delivered), creates the instance, and executes theactivities in the flow until a breakpoint activity is reached.

From Thread perspective

  1. Caller thread T1 receives an incoming message and saves it to the internal delivery queue. Thread T1 is then released by Oracle BPEL Server and the caller can continue its own processing.
  1. Inside the server, a message driven bean called WorkerBean monitors the queue for invocation requests. The WorkerBean picks up the message from the delivery queue, spawns a new thread (T2), and starts a Java Transaction API (JTA) transaction (Txn1) to create and run the instance.
  1. Thread T2 encounters a midprocess breakpoint activity (receive) and decides to dehydrate the process instances.
  1. Thread T2 retrieves a database connection (C1) from the data source connection pool.
  1. Thread T2 saves the process instance to the dehydration database, which ends the transaction (Txn1).
  1. Caller thread T3 intercepts an invocation from the partner and saves the incoming message to the delivery queue (dehydration point).
  1. The Oracle BPEL Server WorkerBean picks up the message from the delivery queue, spawns a new thread (T4), and starts a JTA transaction (Txn2) to continue the instance.
  1. Thread T4 encounters the end of the process and must dehydrate the process instance.
  1. Thread T4 retrieves a database connection (C2) from the data source connection pool.
  1. Thread T4 saves the process instance.

Article 0

$
0
0

Change Weblogic user credential


To modify a user description, password, or group membership:
1.         In the left pane, select Security Realms.
2.         On the Summary of Security Realms page select the name of the realm (for example, myrealm).
3.         On the Settings for Realm Name page select Users and Groups > Users.
The Users table displays the names of all users defined in the Authentication provider.
4.         Select the user name from the table.
If you have a large number of users, use the Customize this table link to retrieve and list only the users that match your search criteria. The Filter By field uses the asterisk (*) as the wild card character.
5.         Select a tab to do one of the following:
•           To edit the user description select General.
•           To change a user password, select Passwords.
•           To set or modify values of the attributes for a user, select Attributes. For more information, see Manage values for user attributes.
•           To add a user to a group or change user membership, select Groups. For more information, see Add users to groups.

6.         Click Save.


Error while initiating BPEL Services from Console

$
0
0
If Error Msg is as given below:
An exception occured while invoking the webservice operation. Please see logs for more details.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: InvalidSecurity : error in processing the WS-Security security header

Then it seems there is security policy which is looking for WS-security in SOAP header.Add WSS Username Token under Security Tab and added my Application username/password and tested(screenshot given below).


If using from SOAP UI or any other Tool use below SOAP Header in the payload:







Compile & Deploy 11g PIP processes using ant

$
0
0
Step1: The adf-config.xml needs to be copied into $PROCESS_NAME/SCA-INF/classes/META-INF folder. Create folder structure if not present. Sample config xml attached herewith. Update with proper MDS details.

adf-config.xml

 
 





Step2 : Run aiaenv.sh to set environmental variables.
Run  $AIA_HOME\aia_instances\LEAD2ORDER\bin\aiaenv.bat

Step3 :  One can compile the process and create SAR file using ant-sca-package.xml

ant -f  $SOA_HOME \bin\ant-sca-package.xml
-DcompositeDir=$AIA_HOME \services\core\Ebiz\RequesterABCS\BatchLoadProductEbizReqABCSImpl
 -DcompositeName=BatchLoadProductEbizReqABCSImpl
-Drevision=3.0
-Dsca.application.home=$AIA_HOME \services\core\Ebiz\RequesterABCS\BatchLoadProductEbizReqABCSImpl

Step4 :  One can compile the process and create SAR file using ant-sca-package.xml

ant -f $SOA_HOME\bin\ant-sca-deploy.xml
-DserverURL=http://$host:8001
-DsarLocation= $AIA_HOME\services\core\Ebiz\RequesterABCS\BatchLoadProductEbizReqABCSImpl\deploy\sca_BatchLoadProductEbizReqABCSImpl_rev3.0.jar
-Doverwrite=true
-Duser=weblogic
-Dpassword=pwd123
 -DforceDefault=true


Using Deployment Plan:
Deploy Meta Data:
1.   Once all the updated metadata is moved to the respective server folders include all the updated file paths in UpdateMetaDataDP.xml  which is the custom deployment plan for deploying/updating the metadata to SOA-MDS.
2.The UpdateMetaDataDP.xml  file is located under
 / aia_instances// config folder.
The entries in UpdateMetaDataDP.xml  should look like below :

<?xml version="1.0" standalone="yes"?>
   <DeploymentPlan component="Metadata" version="1.0">
    <Configurations>
            <UpdateMetadata wlserver="fp" >   
               <fileset dir="${AIA_HOME}/AIAMetaData">
             <include name="AIAComponents/ApplicationObjectLibrary/CRMOD/V1/wsdls/product.wsdl" />
             <include name="AIAComponents/ApplicationObjectLibrary/CRMOD/V1/schemas/product.xsd" />
               </fileset>
            </UpdateMetadata>
    </Configurations>
   </DeploymentPlan>
                   
3.     After  including all the updated file paths in UpdateMetaDataDP.xml , please follow the below steps to deploy/update the metadata to SOA-MDS.

a  .       Login to Putty
b  .      Enter into bash mode by typing bash
c  .       After entering into bash mode navigate to / aia_instances// bin
d  .      Execute source aiaenv.sh, this will set all the class paths and the respective SOA_HOME,    AIA_HOME etc.
e  .      Once the classpath is set run the below ant command to deploy/update the metadata to SOA-MDS :

ant -f $AIA_HOME/Infrastructure/Install/AID/AIAInstallDriver.xml 
-DDeploymentPlan =/apps/orafmw/aia/aia_instances/LEAD2ORDER/config/UpdateMetaDataDP.xml 
-DPropertiesFile= $AIA_HOME/aia_instances/LEAD2ORDER/config/AIAInstallProperties.xml

Once the deployment is successful the updated metadata will be reflected in SOA-MDS.

Deploy Processes:

1.     Once all Modified/New AIA Processes moved to the respective server folders, Include the server location of all the Modified/New AIA Processes paths in DeployCompositeDP.xml  and which is the custom deployment plan for deploying the Modified/New AIA Composite Processes to SOA Server.
The Deployment Plan files is present under
 / aia_instances// config folder.
The entries has to be made in DeployCompositeDP.xml  should look like below :

   <?xml version="1.0"?> 
<DeploymentPlan component="CompositeDeployment" version="1.0">
   <Deployments>
     <!--<Composite wlserver="fp" compositedir="${compositeDir}" 
            compositeName="${compositeName}" revision="${revision}" action="deploy"/>-->
     <Composite compositeName="SyncCustomerCRMODProvABCSImpl" 
            compositedir="${AIA_HOME}/services/core/CRMOD/Custom/SyncCustomerCRMODProvABCSImpl" 
            revision="1.0" wlserver="pips.CRMODtoEbizLeadToOrder" action="deploy" />
     <Composite compositeName="BatchLoadCustomerPartyListEbizReqABCSImpl" 
            compositedir="${AIA_HOME}/services/core/Ebiz/Custom/BatchLoadCustomerPartyListEbizR
            eqABCSImpl" revision="1.0" wlserver="pips.CRMODtoEbizLeadToOrder" action="deploy" >
   </Deployments>
</DeploymentPlan>

4.     After  including all the updated file paths in Deployment Palns , please follow the below steps to deploy the Modified/New AIA Processes to SOA Server.

a  .       Login to Putty
b  .      Enter into bash mode by typing bash
c  .       After entering into bash mode navigate to / aia_instances// bin
d  .      Execute source aiaenv.sh, this will set all the class paths and the respective SOA_HOME, AIA_HOME etc.
e  .      Once the classpath is set run the below ant command to deploy/update the metadata to SOA-MDS :

ant -f $AIA_HOME/Infrastructure/Install/AID/AIAInstallDriver.xml 
-DDeploymentPlan= /apps/orafmw/aia/aia_instances/LEAD2ORDER/config/DeployCompositeDP.xml 
-DPropertiesFile= $AIA_HOME/aia_instances/LEAD2ORDER/config/AIAInstallProperties.xml

Once the deployment is successful the AIA Processes will be reflected in SOA Enterprise Manager.




AIA 11g Release 1 Master Support Note

Error(NoClassDefFound AbstractSubject) while invoking composite from JAVA

$
0
0
Error Msg:
SEVERE: Failed to create a DirectConnectionFactory instance (oracle.soa.api.JNDIDirectConnectionFactory): oracle.soa.api.JNDIDirectConnectionFactory
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
Reason:
In weblogic.jar weblogic.security.subject.Abstract Subject class may not be present.That’s why NoClassDefFound Error.

Resolution:
Use wlfullclient.jar instead. It should resolve the issue.Default classpath:$AIA_HOME//aia/inventory/Scripts/ext/jlib/wlfullclient.jar

Creating a wlfullclient.jar for JDK 1.6 client applications

Use the following steps to create a wlfullclient.jarfile for a JDK 1.6 client application:
1.       Change directories to the server/lib directory.
cd WL_HOME/server/lib
2.       Use the following command to create wlfullclient.jar in the server/lib directory:
java -jar wljarbuilder.jar
3.       You can now copy and bundle the wlfullclient.jar with client applications.
4.       Add the wlfullclient.jar to the client application’s classpath.


Change Data Format from XSLT

$
0
0
Below is a oraext function to run query in data base.
Remember Table Alias is required as special char like (“,’ etc) will cause xml parsing exception.
jdbc/ApplicationCustomDBDS is JNDI name of db to connect.

         <ns0:invoiceDate>
 <xsl:value-ofselect="oraext:query-database(concat("SELECT TO_CHAR(TO_DATE(","'",tns:InvoiceDate,"'",",","'","MM-DD-YYYY","'","),","'","YYYY-MM-DD","'",") res FROM DUAL"),false(),false(),"jdbc/ApplicationCustomDBDS")" />
 </ns0:invoiceDate>

Send Email Notification from AIA

$
0
0
Refer below link


Step1: Configure the UMS Email Driver

Step2: Configure the SOA Suite Workflow Notification properties


Step3: Configuring User Messaging Preferences
Login to http://server:port/sdpmessaging/userprefs-ui and configure channels

To address must be present in LDAP or one may receive Authentication failure.
Step 4:Create BPEL Process

If AIA :
Check for AIAIntegrationAdminin AIAConfigProperties.xml
And AIAEHNotification.xml for content.
Add process to Error Notification list in
 http://$hostname:8001/AIA-under setup section Setup

Ref Doc:
Infrastructure Components and Utilities User's Guide for Oracle
Application Integration Architecture Foundation Pack
11g Release 1 (11.1.1.4.0)
E17366-02

Error Handling in PIP & Notification

$
0
0
Step1:
Add below segment of code in BPEL to call EH process through method present in aia.jar
<![CDATA[oracle.apps.aia.core.eh.InvokeBusinessErrorHandler.process((oracle.xml.parser.v2.XMLElement)getVariableData(
"InvokeEHProcess_initiate_InputVariable","FaultMessage","/corecom:Fault"));]]>

Step2:

This in turn posts msg in jms/aia/aiaErrorTopic queue.From where AIAReadJMSNotification Adapter picks up the data.This process has a msg Filter condition “JMSCorrelationID LIKE '%AIA_EH_DEFAULT%'".

Step3:

Where as in AIA Error Notification page the Error Type decides what value will be passed in JMS Correlation against each process.Possible value are “AIA_EH_ONDEMAND, AIA_EH_DEFAULT etc”.
Changed it to “AIA_EH_DEFAULT” and restarted the server to process.
Step4:
Once process is triggered and failed check for instance of AIAReadJMSNotification to check if working properly.
Step5:
Go to usermessagingserver.Right clk & select MessageStatus to check if notification was sent or not.


Handling Special character in BPEL Payload

$
0
0
Say someone wants to read some data into a String(say from File).Then he wants to parse it into a xsd structure using ora:parseEscapedXMLmethod. If the data contains special char(“&”) it will fail.Before using this method the “&” symbol in payload must be replaced with “&amp;”,by using Java Embedding in BPEL. Sample code attached herewith.

TestSpclChar.zip

How to create wlfullclient.jar


Retrieve Fault Message from SOA-INFRA Database against a particular Composite

$
0
0
select concat(c.cmpst_id,'$') as Composite_ID,F.message as Err_Msg
from WI_FAULT F,cube_instance c
where UPPER(c.composite_name)='SYNCCUSTOMERCRMODPROVABCSIMPL' and c.composite_revision=1.0 and c.cikey=F.cikey

Select the same data in chunk:

select *  from
       ( select concat(c.cmpst_id,'$') as Composite_ID,F.message as Err_Msg ,rownum rnum
          from WI_FAULT F,cube_instance c
          where UPPER(c.composite_name)='SYNCCUSTOMERCRMODPROVABCSIMPL' and     
         c.composite_revision=1.0 and c.cikey=F.cikey  and rownum <= MAX_ROWS )

 where rnum >= MIN_ROWS

How to make your File Adapter pick only one file at a time from a location

$
0
0
In SOA 11g, you use File adapter to read files from the given location.
With this read operation it picks all the files at time.

You want to configure File Adapters that it should pick one file at time from the given location with given polling interval.

Solution :

You set the "SingleThreadModel" and "MaxRaiseSize" properties for your file adapter.
Edit the adapter's jca file and add the following properties:

property name="SingleThreadModel" value="true"
property name="MaxRaiseSize" value="1"

You can set these properties also through jdeveloper, by opening composite.xml, selecting the adapter and then changing the properties through the properties panel.


Invoke SOA composite from JAVA

$
0
0
JARS required:
  1. fabric-common.jar
    $FMW_HOME/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar
  2. soa-infra-mgmt.jar
    $FMW_HOME/oracle_common/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar
  3. wsclient_extended.jar
    $FMW_HOME/
    oracle_common/webservices/wsclient_extended.jar  
  4. wlfullclient.jar
    $AIA_HOME//aia/inventory/Scripts/ext/jlib/wlfullclient.jar

Add binding.adf in composite.xml
Next step is changing the composite.xml to add binding.adf like below(bold) :
 
     <service name="testbpel_client_ep" ui:wsdlLocation="TestBPEL.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/Application11/Project1/TestBPEL#wsdl.interface(TestBPEL)"/>
    <binding.ws port="http://xmlns.oracle.com/Application11/Project1/TestBPEL#wsdl.endpoint(testbpel_client_ep/TestBPEL_pt)"/>
  </service>
  <service name="testbpel_client_ep2" ui:wsdlLocation="TestBPEL.wsdl"> 
   <interface.wsdl interface="http://xmlns.oracle.com/Application11/Project1/TestBPEL#wsdl.interface(TestBPEL)"/>
 <binding.adf serviceName="{http://xmlns.oracle.com/Application11/Project1/TestBPEL}testbpel_client_ep2" 
              registryName=""/> 
</service>

Use the WSDL of one of the other exposed services and add a Wire to the Component.

Attached herewith sample Code to invoke Composite:
Invok_BPEL_Composite.java

Configure Mail Body in AIA

$
0
0
From BPEL process invokes oracle.apps.aia.core.eh.InvokeBusinessErrorHandlercode present in aia.jar.

From there it invokes 
instance.sendNotification(enrichedFaultMessage,  genFaultMessage.getStampMessageCorrelation(), null);

Ultimately java code SendNotificationMessage class is invoked. This process creates the email payload and sends it.

This process picks up auditTrail based on ECID being passed from invoking process. It picks up first composite name/detail from Audit Trail to create the Mail URL.

If required one can over write this java class as per own requirement.

If someone needs to change  the mail template need to go to ORAMDS path /apps/AIAMetaData/config and then edit AIAEHNotification.xml file.
One can add any content to it.And if any xpath value needs to be added then one has to use something like below: #@#XPATH.{/default:Fault/default:FaultNotification/default:ReportingDateTime}#@#

Related Java Classes:
SendNotificationMessage.java

InvokeBusinessErrorHandler.java


ECID.java

Read xml file based on XPATH

$
0
0
Below ReadXML.java will read xml data from abc.xml to produce information like mail.txt


ReadXML.java




Abc.xml

mail.txt

Viewing all 62 articles
Browse latest View live