Latest Entries »

I developed a BPEL 10g process about a year ago that does FTP polling for CSV files. I encountered some issues when the format of the CSV file is incorrect. The default behaviour of Oracle BPEL PM is to write this message to a Rejected Messages folder on the BPEL server. When this occurs, there is no indication in the BPEL Console to indicate that a message has failed. This is not very user friendly for support staff, especially if certain SLA’s are affected by messages that just go missing.  To get around this issue, you can create a Rejection Message handler BPEL process that can write an entry in the BPEL Console or send out alerts for support staff to action.

I followed a guide from another blog

Basically you need to define a new BPEL process with a RejectionMessage input. This message type is defined in the RejectionMessage.wsdl and JCAErrorHandling.xsd files located in the xmllib folder on the SOA server. You can either link to these files or import them directly into your project.


<definitions name="RejectionMessage"
xmlns="" >

<!-- Message Type for JCA Adapter Framework onReject() callback -->

<schema xmlns="">
<import namespace=""

<message name="RejectionMessage">
<part name="message" element="err:RejectedMessage"/>

<portType name="RejectionHandlerPortType">
<operation name="handleRejection">
<input message="tns:RejectionMessage"/>



<?xml version=”1.0″ encoding=”UTF-8″?>
This schema contains the JCA Error handling API (for message rejection).
Use it in any Process/WSIF WSDL which must receive/handle a rejected/bad
message i.e. when the bpel.xml rejection handler has entries of type

This XSD also contains the message type for Fatal Error handler
interface (FatalErrorMessageType).

<schema attributeFormDefault=”qualified” elementFormDefault=”qualified” targetNamespace=”; xmlns:tns=”; xmlns=””&gt;

<element name=”FatalErrorMessage” type=”tns:FatalErrorMessageType”/>

<complexType name=”FatalErrorMessageType”>
<element name=”Originator” type=”string”/>
<element name=”Reason” type=”string”/>
<element name=”Exception” type=”string”/>
<element name=”StackTrace” type=”string”/>

<element name=”RejectedMessage” type=”tns:RejectedMessageType”/>

<complexType name=”RejectedMessageType”>
<element name=”MessageHeader” type=”base64Binary”/>
<element name=”MessagePayload” type=”base64Binary”/>
<element name=”RejectionReason” type=”string”/>
<element name=”AdditionalProperties” type=”tns:AdditionalPropsType”/>
<attribute name=”RejectionId” type=”string”/>
<attribute name=”BatchId” type=”string”/>
<attribute name=”BatchInfo” type=”string”/>
<attribute name=”PrimaryKey” type=”string”/>
<attribute name=”MessageOriginReference” type=”string”/>

<complexType name=”AdditionalPropsType”>
<element name=”RejectionProp” type=”tns:RejectionPropType” minOccurs=”0″ maxOccurs=”unbounded”/>

<complexType name=”RejectionPropType”>
<extension base=”string”>
<attribute name=”name” type=”ID” use=”required”/>
<attribute name=”value” type=”string” use=”required”/>


Once you have defined your BPEL process with the proper inputs, add the bits you need to send out alerts or whatever and deploy to the server. The next step is to tell your polling process to use this newly created process as it’s default rejection handler. You do this by adding a new property to the activationAgent section the bpel.xml file…

<activationAgent className=”oracle.tip.adapter.fw.agent.jca.JCAActivationAgent” partnerLink=”FTP_Inbound”>
<property name=”portType”>Get_CSV_File_ptt</property>
<property name=”rejectedMessageHandlers”>bpel://default|EtpiRejectMessage|handleRejection|message</property>

Miura Golf Clubs

These are absolutely beautiful clubs… Worth drooling over….One day maybe

Java Newline Characters

There are three different major systems for indicating the end of a line (new line): One for Unix, one for the Macintosh, and one for DOS/Windows. The ‘\n’ character can be used to represent the single Unicode character with the value 10 (‘\u000A’). Windows programs will sometimes accept this, but often need to use a pair of characters (carriage return followed by line feed). Use the method below to get the newline string that is appropriate for your system.

You can get the value for the system your Java program is running on from the system properties. It is important to do this with portable programs. For example,

public static String newline = System.getProperty("line.separator");

I have often come accross the situation where I quickly need to test SMTP server configuration. A very quick and simple way to test that all the setups are correct is to use telnet to connect to the SMTP server and to manually talk to the server…

Suppose you have a new SMTP server called

telnet 25

This starts a telnet session to port 25 (SMTP) on

Connected to
Escape character is '^]'.
220 ESMTP Postfix (Ubuntu)

Now greet the server:


The mail server should respond with a 250 status, telling you who it is


Now you can start with the mail itself:

250 2.1.0 Ok

250 2.1.5 Ok

Now start with the content:


354 End data with <CR><LF>.<CR><LF>

SUBJECT: test mail
This is the body

The server responds by telling you that your message was added to the mail queue.

250 2.0.0 Ok: queued as 9620FF0087

You can now exit your telnet session:



Get every new post delivered to your Inbox.