Thursday, July 23, 2009

ORABPEL-10903

Problem:
ORABPEL-10903: "failed to read wsdl" when deploying BPEL process

Solution:
Check your schema file which you are using. There might be a possibility that the schema file name contains spaces. Rename the schema file(with no spaces).

Note that if you are importing that schema in your wsdl file then dont forget to change the name there too.

Redeploy the project and the error will be gone.

ORABPEL-05244

Problem:
ORABPEL-05244 error sometimes occurs in the opmn log shortly after deploying the BPEL process. Furthermore, it may cause the BPEL domain to hang.
The error looks like:
<2009-06-27 11:14:27,752> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError>
Error while invoking bean "process manager": Timed out waiting for process load lock.
Failed to obtain load lock for process "HelloWorld-1.0"; timed out after 120,000 seconds.

Timed out waiting for process load lock.
Failed to obtain load lock for process "HelloWorld-1.0"; timed out after 120,000 seconds.

Solution:
There is no direct solution to solve this problem.
To overcome this there are some suggestion by which you can get rid of such errors. The following suggestions are:
1) Undeploy the existing project.
2) Bounce the SOA Server.

ESB:rejectedMessageHandlers

Problem:
Files which do not adhere to input file schemas should be rejected or moved to specified folder other than archive folder in ESB.

Solution:
For this, first create an ESB project. Add a Read file Adapter to it. Now to set the rejectedMessageHandlers property, we need to open the <Read adapter name>.esbsvc file. This file should be present under ESB project folder.

Add the following code just after the closing tag of invocation i.e. </invocation> and just before the </service> tag.

<endpointProperties>
<property name="rejectedMessageHandlers" value="file://C:\SOADir\reject"/>
</endpointProperties>

Here,
C:\SOADir\reject is my directory where I want my rejected files to come.

Note: If at anytime you try to refresh anything in the project, this property gets omitted automatically. So be sure to add it again in .esbsvc file if you are refreshing anything in the project.

BPEL:rejectedMessageHandlers

Problem:
Files which do not adhere to the input file schemas should be rejected or moved to specified folder other than archive folder.

Solution:
For this we need to make an empty project which will be initiated by a file. We need to use a Read File Adapter. After the Adapter is configured and connected to a Receive activity, a bpel.xml file will be generated.
A property called ‘rejectedMessageHandlers’ is used and set in the bpel.xml file under <activationAgent> element.

Sample code for this should look like:
<activationAgents>
<activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="Read_File">
<property name="portType">Read_ptt
<property name="rejectedMessageHandlers">file://C:\SOADir\reject
</activationAgent>
</activationAgents>

Here,
C:\SOADir\reject is my directory where I want my rejected files to come.

Note: If at anytime you try to refresh anything in the BPEL project, this property gets omitted automatically. So be sure to add it again in bpel.xml file if you are refreshing any compomnent in the project.

OWSM: File-based authentication

Problem:
Incorporate File based authentication in OWSM

Thoughts:
A good article is already there from Oracle on this topic. I just want to highlight that there is a change in syntax for encoding the file in SOA 10.1.3.1 and SOA 10.1.3.3. We will be using a md5encode utility for doing text file based authentication in OWSM.

Solution:
After creating Gateway and its related service in OWSM, we need to add a policy i.e. file based authentication.
Create a text file and add a user name and password in the following format:- User_name:Password

Now save the file with extension as .htpassword. Now we have to use the md5encode operation to encode the password associated with a user_name.

Syntax: SOA 10.1.3.1
>wsmadmin md5encode username password htpasswdfile

Here,
username – User name in the text file;
password – Password assigned to the user;
htpasswdfile – Name of the file containing the user name and password

Syntax: SOA 10.1.3.3
>wsmadmin md5encode htpasswdfile username

Here,
htpasswdfile – Name of the file containing the user name and password;
username – User name in the text file

Thursday, July 2, 2009

Header Information in ESB

Problem:
To retrieve Header Information in ESB

Solution:

For FTP Adapter:
1) Create a variable in XSL mapper
2) Use the code in XPath:
ehdr:getRequestHeader("/fhdr:InboundFTPHeaderType/fhdr:fileName","fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;")

For File Adapter:
1) Create a variable in XSL mapper
2) Use the code in XPath:
ehdr:getRequestHeader("/fhdr:InboundFileHeaderType/fhdr:fileName","fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;")