Matter faced during integration project

Tuesday, June 23, 2009

Error while processing xpath expression *** the reason is FOTY0001: type error

Funny issue last time, might be useful to share it.
Worked with JDev on a BPEL process and opened a transform activity. Then before it loads the "Source Part" and the "Target Part", I clicked on the "ok" button to move out of there.

But JDev saved the transform activity with empty "Source Part" and "Target Part".
As the loading of source and target take quite some time because the .xsl is fairly big (on my PC anyway) it is easy to press the "ok" button before they are loaded. (as shown on the picture below).


Afterward, the process compiled fine, but a runtime exception appear at runtime complaining about the XSL transformation. The error message was not clear at all, and it took me some time to figure out what happened.
the complete error message was:

XPath expression failed to execute.
Error while processing xpath expression, the expression is "ora:processXSLT('OrderTransformation.xsl',bpws:getVariableData('inputVariable'))", the reason is FOTY0001: type error.
Please verify the xpath query.

Tuesday, June 16, 2009

Secure a web application in Oracle OC4J and reuse BPEL console credentials

This week, the team had to deploy a web application on OC4J. However we wanted to re-use the security settings of the BPEL console:


1. Created a web application with the following web.xml:


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee">
   <display-name>webAccess</display-name>
   
   <security-constraint>
      <display-name>ILayer Scheduler</display-name>
      <web-resource-collection>
         <web-resource-name>web-resource-name</web-resource-name>
         <url-pattern>/*</url-pattern>
      </web-resource-collection>
      <auth-constraint>
         <role-name>toto-administrators</role-name>
      </auth-constraint>
   </security-constraint>

   <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>Ilayer FTP Application</realm-name>
   </login-config>

   <security-role>
      <description>Dummy Toto Administrators</description>
      <role-name>toto-administrators</role-name>
   </security-role>
</web-app>


2. Modified the file <$oracle_home>/j2ee/home/config/system-jazn-data.xml to add a role:


<role>
   <name>toto-administrators</name>
   <display-name>Scheduler Admin Role</display-name>
   <description>Admin role for scheduled application</description>
   <members>
      <member>
         <type>user</type>
         <name>oc4jadmin</name>
      </member>
   </members>
</role>


3. Then had to restart OC4J for the settings to be taken into account

Friday, June 12, 2009

Consuming a web service over https in JAVA

Had to consume a web service over https.
Here are the links:

how to build a web service over HTTPS (did not follow it, though)
http://www.pankaj-k.net/WSOverSSL/WSOverSSL-HOWTO.html

and how to consume it:
http://www.javaworld.com/javaworld/javatips/jw-javatip96.html

How to test a proxy with telnet

Lately I tried to test a proxy with telnet.
Here are the step I followed:

1. Open a telnet session
telnet www-proxy.oracleoutsourcing.com 80
2. Make the http request to the server you want to try
GET http://www.nfl.com HTTP/1.1
3. Give the host
host:www.nfl.com
(press enter twice)

This allow me to test our proxy from an environment we can only access through telnet.