Friday, 31 July 2009

Manipulating SOAP headers in Apache ODE

Share
SOAP headers are extremely useful feature, they carry additional information required for WS processing.

The best part is that this information doesn't have to be explicitly defined in WSDL.

Not only the receiver can use headers for its own processing, but also intermediaries can add and remove headers throughout the message relaying so that the ultimate receiver doesn't have to be aware of what happened to the SOAP message while delivering.

In my PhD system I enhance WS-BPEL processes by adding additional partners which require some context data.

I didn't want to modify the main process WSDL file so that my mechanism could be transient for end users which could still invoke theirs WS-BPEL processes without knowing that it was somehow modified.

Simply if no SOAP header context data is available, WS-BPEL acts in the original way.

Today I will show you how you can add SOAP headers support in Apache ODE.

Monday, 27 July 2009

Obfuscating Java code with ProGuard and Maven2

Share
Obfuscating code is very useful when:
  • you want to deliver software on premise and you don't want to expose to much of software internals, you'd like to make your code more hard to reverse-engineer

  • you'd like to make your code more compact for faster loading and smaller memory footprint
One of the best known Java obfuscators is ProGuard.

And today I will show you how to integrate ProGuard and Maven2 to automate the process of building obfuscated software.

Monday, 20 July 2009

Hard times testing: Eclipse and Maven2 JUnit runners

Share
Writing tests is not an easy task - we know it all.

But sometimes running them is even more difficult.

It can be difficult especially when you want to run your tests from:
  • IDE - run manually by a developer
  • Maven2 - run manually/automatically by a developer or an automatic continuous integration build tool
Quite often these environments impose a different behaviour or a different configuration for the very same test.

Today I will show you a simple example of Java SecurityManger test which runs in both Eclipse IDE and Maven2.

I will show you all issues I encountered and how I solved them.

Thursday, 16 July 2009

Validating WS-BPEL programmatically

Share
Some time ago (actually this time last year) I wanted to validate WS-BPEL process programmatically.

System which I'm developing as a part of my PhD thesis must validate WS-BPEL before enhancing and deploying it on a remote WS-BPEL engine.

I decided to use Apache ODE bpelc command line tool.

bpelc takes as an argument the WS-BPEL process main file to be validated, for example:
bin/bpelc.bat c:/Studies/PhD/nuntius/instance2/var/tmp/nuntius29dd0bfc4f0/XhGPW.bpel
Today I will show you how I'm invoking it from Java and what problems I encountered.

Monday, 13 July 2009

Scripting for the Java Platform: JavaScript and Java

Share
I have been involved in development of Voice applications lately.

VoiceXML defines <script /> tag which allows developers to write some JavaScript/ECMAScript to be evaluated by voice gateways during call processing.
Also, some phone application servers use JavaScript/ECMAScript to perform some back-end processing as well.

I don't know precisely how those voice platforms implement it, but I surely know how I would implement it :)

I would use Java 6 and its javax.script scripting API or, to be more precise, I would use JSR-223: Scripting for the Java Platform.

Java 6 comes with JavaScript engine, but it is possible to plug in Python or Ruby engines as well.

And today I will show you some of its features and JavaScript support.

Monday, 6 July 2009

Apache Tomcat clustering, load balancing, failover, session replication, and optimisation

Share
You all are probably familiar with high-availability clusters.

To cut long story short, the idea of high-availability clusters aims at creating failure resistant, reliable, and ultra fast blistering systems.

HA clusters most commonly use the following techniques (or should I say "buzzwords"?):
  • clustering
  • load balancing
  • failover
  • session replication
There are lots of documentation, forums, blog posts about it, but they are full of errors (including Apache's official mod_proxy documentation).

Here I show you how to cluster, load balance, failover, and replicate session using Apache HTTP Sever 2.2.11 and Apache Tomcat 6.0.20.