Wednesday, May 20, 2009

BPEL Process Manager Server connection :Failed

Hi all,

In the SOA Suite 10.1.3.4 and using Jdev 10.1.3.4,when trying to create the integration server connection.
The BPEL Process Manager Server fails when you check the details,the error is on the Identiy service says
"java.io.FileNotFoundException:http://:80/integration/services/testconnection/BPELConnection ".
The workaround for this is:
Login to EM console goto the oc4j instance Stop and start the hw_services
And goback to Jdev and create the connection again,it succeeds this time.

Happy learning
Regards
Ashwini

Saturday, May 9, 2009

FTP Adapter File Archive

Hi,
The FTP adapter reads the file but does not archive the file in the specied location.
Especially when reading from a remote location.

There is a Property UseRemoteArchive.This property needs to be set to true in the jca:operation of the WSDL and redeploy your process.
The Process starts archiving the file.

Happy learning

OraBPEL-10902 Compilation Failed

Hi,
Orabpel-10902: Compilation failed
Description :in "bpel.xml", XML parsing failed because "undefined part element.In WSDL at "http://localhost:9700/orabpel/default/RapidDistributors/RapidDistributors?wsdl", message part element "{http://schemas.xmlsoap.org/ws/2003/03/addressing}ReplyTo" is not defined in any of the schemas.Please make sure the spelling of the element QName is correct and the WSDL import is complete.".Potential fix: n/a.

This is one of the errors during compilation.

In my case what happened was:
1)All the processes were created in 10.1.3.3 and then we migrated to 10.1.3.4,suddenly all processes which were running on 10.1.3.3 started throwing this error.

After checking all the properties in the Jdev i found this thing.

There is a Property Use Http Proxy,which is in the Tools->Preferences->Web Browser and Proxy
This needs to be uncehcked.
After unchecking this compile the processes again,error gone.
The Http was not able to fetch the WSDL which was causing this error.

Happy Learning

Friday, February 27, 2009

Creating AQ JMS Queue

Hi,
In this post i shall give information on creating AQ JMS Queues.
These JMS queues are database persisitant and can be accessed from the JMS Adapter.
Creating a AQ JMS queue has 3 steps:
1)Create a user in the DB: jmsuser/jmsuser
2)Create a queue table
3)Create the queue inside the queue table.

1)Creating the jmsuser :
Log on to Sql from command promt or SQl*plus and Create a user

CREATE USER jmsuser IDENTIFIED BY jmsuser;
GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE, AQ_USER_ROLE to jmsuser;
GRANT EXECUTE ON DBMS_AQADM TO jmsuser;
GRANT EXECUTE ON DBMS_AQ TO jmsuser;
GRANT EXECUTE ON DBMS_LOB TO jmsuser;
GRANT EXECUTE ON DBMS_JMS_PLSQL TO jmsuser;

2)Creating Queue table
Login to SQL as jmsuser and run the below command

DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table => 'AQJMSQueueTab',Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE');

3)Creating the AQ JMS queue
Now create a JMS queue inside the above created table and start the queue

DBMS_AQADM.CREATE_QUEUE( 'AQJMSQueue', 'AQJMSQueueTab');
DBMS_AQADM.START_QUEUE('AQJMSQueue');

Now this queue can be accessed from the JMS adapter.

To create a JMS topic create a Queue table with a propetry "multiple_consumer" set to true.
And then create a queue inside this table.

Happy Learning

Regards
Ashwini

Friday, January 16, 2009

Clone for each in XSLT

Hi All,
We all know we use for each when we want to read a array.
We also have another function called as clone for each in XSLT.
Suppose u have a scenario like u want to repeat a bunch of data,with only one of the field changing.
In my scenario i have a employee information,address of the employee for both permanent and present is the same,but i want to set the flag to true for permanent and flag set to false for present.
When i get the input i get the address only once,i am mapping it twice in the XSLT.
For this i used Clone for each,and set the flag to T for Permanent addr,and F for present.

Happy learning.

Jdeveloper Extension

A very good document which gives information on Jdeveloper extensions.
http://www.oracle.com/technology/products/jdev/howtos/1013/extension/extension.html

Happy Learning

Tuesday, January 6, 2009

ora:get-Content-as-string

Hi,
In my previous post i wrote about a custom xpath function to convert a string representation of XML to a XML.
In this post lets see a function which the reverse of this.
This function can be used to convert a XML to a string.
for ex:
xsl:value-of select ="orcl:get-content-as-string(/nso:Booklist/nso:Bookdesc:desc")

Happy Learning






ora:parseEscapedXML

Hi,
Oracle provides a custom xpath function,which can be used to convert a string representation of a XML input to a XML ,i.e the input which you are getting is a proper XML input but has been represented as a string.
The function is ora:parseEscapedXML(String).
One workaround is when we directly use this function in the XSLT,by default it does value-of,so the value of the XML input is selected.
Ex:
When we call this function and give the output of this function to a out variable the source looks like
xsl:value-of select="orcl:parseEscapedXML(/ns0:Message/ns0:msgData)"/

So the value of the variable msgData is passed instead of the XML.

This can be overcome by
1)Create a local XSLT variable pass the output of your function to this variable.
2)Use Copy-of and copy the variable to the required output variable
For Ex:
Replace the whole of
xsl:value-of select="orcl:parseEscapedXML(/ns0:Message/ns0:msgData)"/
with
xsl:variable name="parsedMsgData" select="orcl:parseEscapedXML(/ns0:Message/ns0:msgData)"/>

xsl:copy-of select="$parsedMsgData"/


Happy Learning

Thursday, December 11, 2008

User Defined Functions in XSLT

Hi,

In this post lets learn on the User Defined Functions Option in the Transform activity in Jdeveloper,which lets you use your own function in the transform activity.

There are mainly two steps:

1)Write a class with a static method to implement the logic you want.
2)Register the xml in Jdeveloper,and add the class in Jdev classpath

To illustrate more on it lets take an example of adding two numbers.

1)The first step is to create a class with static method implementing the logic .

Take a example of adding two numbers,with a class called as TestingExtensionFunctions

The static method is as below:

package oracle.testing;
public class TestingExtensionFunctions
{
public static int add(int a,int b)
{
return a+b;
}
}

2)Next,Create an XML file detailing the extension functions which we will give in the JDeveloper "User Defined Extension Functions Config File" field of the XSL Map preferences (Tools->Preferences->XSL Map). This will list the functions in the User Defined Extension Functions section of the XSL Map component palette so you can drag and drop it into the XSLT at design time.

The extension functions XML looks like this :



After adding this xml file make the java class that implements the functions,part of JDeveloper classpath. This can be done by creating a jar file in \jdev\extensions directory.

Create the jar file in the Jdev_home\jdev\extensions directory.
One important thing is to add the extension.xml file to the jar file.
This can be done by Opening the jar file using Winzip,and add the file.
The extension.xml file should be placed in the Meta-inf Folder.

The contents of the extensions.xml file is like the following



Start using the function
If the XSL generated by the XSL Mapper is to be used by the Oracle BPEL engine, please add the jar file to the application server classpath.For OC4J copy the jar file to \j2ee\home\applib.

Happy Learning

Regards
Ashwini





Wednesday, December 10, 2008

BAM - Error

Hi,

BAM Start up page reports a error "You are Unable to connect to services........",when you do any new inatallation on the machien where the BAM is running.
When you go and check for the services,all the services except the Active Data cache services will be running.


when you try to start the ADC services it throws a error like "The Oracle Active Data cache service on Local Computer started and stoppped.some services stop automatically if they have no work to do ....."


The main reason for this is,ADC expects the path of the BAM client to be the first path in the PATH enviromental variable.
for ex: " C:\ORACLE_BAM10g\ClientForBAM\bin;" this should be the first path in the PATH variable.

If any new installation happens on the system,those path gets added to the PATH variable,so the client path no longer remains the first path this is when ADC throws a error.
So after any new installtion,ensure that the client BAM path is the first path in PATH variable.

Happy learning
Regards
Ashwini

BAM - Creating Data Objects

Data Objects(DO) in BAM hold the data which is used in creating dashboards.
Two ways to crete DO are:
1)Manually Create in Architect

2)Create DO From Enterprise Link plan

1)Manually Creating DO in Architect :
1)Login to BAM->click on Architect
2)Select Dataobjects from the dropdown,create dataobject
3)Give the DO a name,location - specify under which folder should the DO be created.
DO should have atleast one field,otherwise the architect ill not let you save the DO
4)Click on Add Field,give it name,set the datatype,set the other values and click on create dataobject.
Once the DO is created,e can also input sample data from the contents option ->Edit content->Add,enter the content and save the value.

Architect follows folder structure to store DO's.The main folder is the DataObjects Folder,under which all the DO's get created by default.We can also create subfolders under DataObjects folder and create DO's inside the subfolder.

2)Create DO From Enterprise Link plan
Enterpreise Link allows us to create dataobjects from the plan.The OracleBAMinsertsink which is used in a plan to insert data,also lets you to create a new DO and then insert values into the created dataobject.

The datobjected created using this option has all the fields sselected in the plan.

Happy Learning
Regards

Ashwini