Go to the following site and type in your code which you want to publish. Encode it, copy and paste the encoded code in your Blog. As simple as that !
http://centricle.com/tools/html-entities/
Tuesday, February 2, 2010
Jave Base64 Decoder for decoding Opaque data
Use the following java code to decode opaque data. Very useful if you are capturing the rejected messages as opaque data and want to translate the data:
String input = (String)getVariableData("OpaqueString");
Base64Decoder Decoder = new Base64Decoder();
try
{
String decoded = Base64Decoder.decode(input);
setVariableData("ErrorPayload",decoded);
}
catch(UnsupportedEncodingException uee)
{
uee.printStackTrace();
}
String input = (String)getVariableData("OpaqueString");
Base64Decoder Decoder = new Base64Decoder();
try
{
String decoded = Base64Decoder.decode(input);
setVariableData("ErrorPayload",decoded);
}
catch(UnsupportedEncodingException uee)
{
uee.printStackTrace();
}
How to avoid multiple instances of BPEL trying to access the same message in a High Available Environemnt .....(Singleton BPEL processes) You have to configure the bpel.xml file in your BPEL process to include the following 'clusterGroupId' property name: ..... SomeServicename.wsdl MyClusterName PollingLogicalDeleteService_ptt
This feature uses JGroups underneath for the implementation, hence the clusterGroupId property. These features require cluster and JGroups configuration in
$ORACLE_HOME/bpel/system/config/collaxa-config.xml and $ORACLE_HOME/system/config/jgroups-protocol.xml. All BPEL instances
participating in the cluster must share the same cluster name in collaxa-config.xml,and the same multicast address and port in jgroups-protocol.xml.
Rejection Message Handling
The "Rejected Message handlers" come in four different flavors. They must be defined as
part of the Activation Agent properties.
· File system based Rejection Handler
<property name="rejectedMessageHandlers">
file://<directory-path>
</property>
for example
<property name="rejectedMessageHandlers">
file://C:/orabpel/domains/default/rejectedMessages
</property>
This rejection handler is straight forward and the bad messages are written to the
configured directory using the file name pattern
INVALID_MSG_ + <process-name> + <operation-name> + <current-time>
· RAW Oracle Advanced Queue based Rejection Handler
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@<db-host>:<tns-port>:<sid>|<user>/<password>|<queue-name>
</property>
The <password> can be encrypted. For example
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@acme-sun:1521:ORCL|scott/tiger|JCA_BAD_MESSAGES
</property>
This rejection handler allows the user to designate a Oracle Rdbms RAW AQ queue
as the rejection storage. Note that the ":" and "|" must appear in the places shown.
Also note that the password can be encrypted using the encrypt.bat utility in
orabpel/bin.
· BPEL Process Rejection Handler
<property name="rejectedMessageHandlers">
bpel://<bpel-domain[:<password>]>|<process-name>|<operation-name>|<input-message-partname>
</property>
The <password> for the BPEL domain can be encrypted - "[]" means that the
property is optional. For example
<property name="rejectedMessageHandlers">
bpel://default|JCA-RejectionHandler|handleRejection|message
</property>
This rejection handler will send the bad message to another (designated error
handling) BPEL process. The user can thus define a process with a Receive operation
of his own choosing (WSDL and BPEL src) - the only constraint is on the Message
Type of the message that will be sent to this rejection handler. It must be declared to
have the type "RejectedMessage". This can conveniently be achieved by importing
the "xmllib" resident WSDL "RejectionMessage.wsdl" which defines such a message:
<message name="RejectionMessage">
<part name="message" element="err:RejectedMessage"/>
</message>
An xmllib WSDL import (from another WSDL) is achieved using the "well-known"
URL
<import namespace="http://xmlns.oracle.com/pcbpel/rejectionHandler"
location="http://localhost:9700/orabpel/xmllib/jca/RejectionMessage.wsdl"/>
i.e. the Receive operation WSDL which the user defines for his Rejection Handler BPEL Process would simply contain this import and then the port type would
reference this:
<definitions ...
xmlns:rej="http://xmlns.oracle.com/pcbpel/rejectionHandler"
<portType name="MyRejectionHandlerPortType">
<operation name="myHandleRejectionOperation">
<input message="rej:RejectionMessage"/>
</operation>
</portType>
· WSIF Based Rejection Handler
<property name="rejectedMessageHandlers">
wsif://<wsif-wsdl-location>|<operation-name>|<input-message-part-name>
</property>
For example
<property name="rejectedMessageHandlers">
wsif://file:/C:/orabpel/samples/test/ErrorTest/FileAdapterWrite.wsdl|write|message
</property>
This last rejection handler lets the user configure any type of WSIF WSDL (JCA, EJB,
JMS, HTTP, Java etc), i.e. any kind of Service which can be reached via WSIF - as
the bad message handler. The exact same constraint vis-a-vis the Message Type as
described above for the BPEL Process Rejection Handler also applies here.
Notes: (1) BPEL supports all four types of rejection handlers
(2) ESB supports only 3 types of rejection handlers except the BPEL based rejection handler ( Until Soa Suite 10.1.3.5) .
The following examples demostrate how rejectionmessageHandler can be defined in ESB
(a) ESB AQ rejected Message Handler:
queue://jdbc:oracle:thin:@localhost:1521:XE|jmsuser/jmsuser|ESB_REJ_MSG_TOPIC
(b) ESB BPEL rejected Message Handler:
bpel://default|CaptureRejectedMessage|process|message
(c) ESB WSIF based rejection handler:
wsif://http://localhost:8888/orabpel/default/CaptureRejectedMessage/1.0/CaptureRejectedMessage?wsdl|handleRejection|message
part of the Activation Agent properties.
· File system based Rejection Handler
<property name="rejectedMessageHandlers">
file://<directory-path>
</property>
for example
<property name="rejectedMessageHandlers">
file://C:/orabpel/domains/default/rejectedMessages
</property>
This rejection handler is straight forward and the bad messages are written to the
configured directory using the file name pattern
INVALID_MSG_ + <process-name> + <operation-name> + <current-time>
· RAW Oracle Advanced Queue based Rejection Handler
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@<db-host>:<tns-port>:<sid>|<user>/<password>|<queue-name>
</property>
The <password> can be encrypted. For example
<property name="rejectedMessageHandlers">
queue://jdbc:oracle:thin:@acme-sun:1521:ORCL|scott/tiger|JCA_BAD_MESSAGES
</property>
This rejection handler allows the user to designate a Oracle Rdbms RAW AQ queue
as the rejection storage. Note that the ":" and "|" must appear in the places shown.
Also note that the password can be encrypted using the encrypt.bat utility in
orabpel/bin.
· BPEL Process Rejection Handler
<property name="rejectedMessageHandlers">
bpel://<bpel-domain[:<password>]>|<process-name>|<operation-name>|<input-message-partname>
</property>
The <password> for the BPEL domain can be encrypted - "[]" means that the
property is optional. For example
<property name="rejectedMessageHandlers">
bpel://default|JCA-RejectionHandler|handleRejection|message
</property>
This rejection handler will send the bad message to another (designated error
handling) BPEL process. The user can thus define a process with a Receive operation
of his own choosing (WSDL and BPEL src) - the only constraint is on the Message
Type of the message that will be sent to this rejection handler. It must be declared to
have the type "RejectedMessage". This can conveniently be achieved by importing
the "xmllib" resident WSDL "RejectionMessage.wsdl" which defines such a message:
<message name="RejectionMessage">
<part name="message" element="err:RejectedMessage"/>
</message>
An xmllib WSDL import (from another WSDL) is achieved using the "well-known"
URL
<import namespace="http://xmlns.oracle.com/pcbpel/rejectionHandler"
location="http://localhost:9700/orabpel/xmllib/jca/RejectionMessage.wsdl"/>
i.e. the Receive operation WSDL which the user defines for his Rejection Handler BPEL Process would simply contain this import and then the port type would
reference this:
<definitions ...
xmlns:rej="http://xmlns.oracle.com/pcbpel/rejectionHandler"
<portType name="MyRejectionHandlerPortType">
<operation name="myHandleRejectionOperation">
<input message="rej:RejectionMessage"/>
</operation>
</portType>
· WSIF Based Rejection Handler
<property name="rejectedMessageHandlers">
wsif://<wsif-wsdl-location>|<operation-name>|<input-message-part-name>
</property>
For example
<property name="rejectedMessageHandlers">
wsif://file:/C:/orabpel/samples/test/ErrorTest/FileAdapterWrite.wsdl|write|message
</property>
This last rejection handler lets the user configure any type of WSIF WSDL (JCA, EJB,
JMS, HTTP, Java etc), i.e. any kind of Service which can be reached via WSIF - as
the bad message handler. The exact same constraint vis-a-vis the Message Type as
described above for the BPEL Process Rejection Handler also applies here.
Notes: (1) BPEL supports all four types of rejection handlers
(2) ESB supports only 3 types of rejection handlers except the BPEL based rejection handler ( Until Soa Suite 10.1.3.5) .
The following examples demostrate how rejectionmessageHandler can be defined in ESB
(a) ESB AQ rejected Message Handler:
queue://jdbc:oracle:thin:@localhost:1521:XE|jmsuser/jmsuser|ESB_REJ_MSG_TOPIC
(b) ESB BPEL rejected Message Handler:
bpel://default|CaptureRejectedMessage|process|message
(c) ESB WSIF based rejection handler:
wsif://http://localhost:8888/orabpel/default/CaptureRejectedMessage/1.0/CaptureRejectedMessage?wsdl|handleRejection|message
SOA Fault Handling
A BPEL fault has a fault name called a Qname (name qualified with a namespace) and a possible messageType. There are two categories of BPEL faults:
-
Business faults
-
Run-time faults
(2)Run-time faults: Run-time faults are the result of problems within the running of the BPEL process or Web service
targetNamespace="http://schemas.oracle.com/bpel/extension" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
bindingFault : A
bindingFaultis thrown inside an activity if the preparation of the invocation fails. For example, the WSDL of the process fails to load. AbindingFaultis not retryable. This type of fault usually must be fixed by human interventionremoteFault : A
remoteFaultis also thrown inside an activity. It is thrown because the invocation fails. For example, a SOAP fault is returned by the remote service. AremoteFaultcan be configured to be retried
Friday, November 14, 2008
Changing ORABPEL /ORAESB schema password
Step 1: Change ORABPEL Schema Password: Execute the following steps,
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> ALTER USER orabpel IDENTIFIED BY
E.g. ALTER USER orabpel IDENTIFIED BY welcome1
Step 2: Manually change password in Oracle Internet Directory (OID):
Login as (root) orcladmin in Oracle Directory Manager
Navigate to OrclResourceName=ORABPEL,orclReferenceName=SERVICE_NAME,cn=IAS
Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext in the System Objects Frame In the properties frame, input the new password across the orclpasswordattribute and click ‘Apply’
Step 3: Change OC4J JDBC Datasources in OC4J_SOA
Login to Application Server Console as ‘oc4jadmin’ and navigate to OC4J_SOA. Click on Administration Tab -> JDBC Resources
Click on BPELPM_CONNECTION_POOL link. In the credentials, provide this new password after clicking on ‘Use Cleartext Password’ radio button.
Making connections to Oracle lite Database
If you have done a basic installation of SOA Suite 10.1.3.3 or 10.1.3.4 version, it installs a default Olite database with orabpel, oraesb and orawsm schemas.
Here is the solution to connect to these schemas through sql/Jdev
Using msql, Mobile SQL Client ($ORACLE_HOME\Mobile\Sdk\BIN\msql.exe):
Conencting to orabpel schema:
>msql system/manager@jdbc:polite:orabpel
Conencting to oraesb schema:
>msql system/any@jdbc:polite:oraesb
Using Jdev
Making connections to Orabpel schema:
Connection Type: Olite DB
User id/ Password: system/ manager
Host name: localhost or your SOA server name
Port: 1531
Sid: orabpel
Making Conenctiosn to Oraesb schema:
Connection Type: Olite DB
User id/ Password: system/ any
Host name: localhost or your SOA server name
Port: 1531
Sid: oraesb
For ESB schema connection you to select the driver path located at SOA_HOME/Integration/esb/lib/olite40.jar. This has to be added to your class path
Subscribe to:
Posts (Atom)