Saturday, January 21, 2012

OSB rejected messages handling with WSIF

Here http://ws.apache.org/wsif/ the official Apache page on WSIF

I have tried assigning a dummy WebService (based on a sample WSDL generated by Eclipse)

In the "JCA Transport Configuration" of my Proxy Service I specify:

EndPoint Properties rejectedMessageHandlers = "wsif://http://localhost:7001/errorpoller/errorhandlerws?WSDL|newOperation|in"

Of course it doesn't work, I get this error:

JCA_FRAMEWORK_AND_ADAPTER BEA-000000 Rejection handler failed Rejection handler failed Error while trying to hand off bad message to Rejection handler wsif://http://localhost:7001/errorpoller/errorhandlerws?WSDL|newOperation|in due to: Unable to find an available port Please address the underlying issue or correct/redeploy the process

Here http://docs.oracle.com/cd/E12839_01/integration.1111/e10231/life_cycle.htm#BABGIGGI at "Web Service Handler" they report a sample payload schema, but it's all broken. It was impossible to find a complete WSDL for a proper Web Service Handler. How sad.

In fact it was my mistake, I should specify: Absolute wsdl path|service name|port name
and the port name is "NewWSDLFileSOAP" and the service name is "NewWSDLFile"
so I try with rejectedMessageHandlers = "wsif://http://localhost:7001/errorpoller/errorhandlerws?WSDL|NewWSDLFile|NewWSDLFileSOAP"

All of a sudden I find this example of rejectionmessage.wsdl : http://bentaljaard.wordpress.com/2010/10/22/creating-a-bpel-rejected-message-handler-for-ftp-file-polling/

referring to this http://oraintpc.blogspot.com/2007/10/in-action-adapter-rejection-handlers-in.html

sounds cool! I try to implement it stealing this WSDL
it turns out that in the oracle.tip.adapter.fw.agent.jca.JCAActivationAgent there is a property "portType" which needs to be set! Of course in the Oracle documentation there is no mention of this, they only say to set the property "rejectedMessageHandlers"

Here http://docs.oracle.com/cd/B14099_19/integrate.1012/b14058.pdf is says

WSIF Based Rejection Handler: In WSIF based Message Rejection handler, you can configure any type of WSIF WSDL, such as JCA, EJB, JMS, HTTP, and Java. You can configure any kind of service that can be reached through WSIF as the bad message handler.
The syntax for specifying a WSIF based Message Rejection handler is as follows:

<property name="rejectedMessageHandlers"> wsif://<wsif-wsdl-location>|<operation-name>|<input-message-part-name> </property>

You can specify a WSIF based Message Rejectionhandler as shown in the following example:

<property name="rejectedMessageHandlers"> wsif://file:/C:/orabpel/samples/test/ErrorTest/FileAdapterWrite.wsdl|write|mess age </property>

The WSIF based Message Rejection handler has the same constraint on message type as that of BPEL Process Rejection Handler. Refer to the BPEL Process Rejection Handler section.


still working on this... not a single COMPLETE working example available on the entire internet...

2 comments:

Varma said...

Were you able to get it working?

vernetto said...

no way, we opened a support case with Oracle, and it seems that in version 10.3.5 (11.1.1.5) you cannot use WLSD based WS to handle rejected messages.... bummer.