Showing results for November, 2009 (archive)

Consuming Web Services from EJB 3 using JAX-WS

1 Comment » November 30th, 2009 by Henri Bezemer

In this post I will show how to consume a Web Service from an EJB 3 stateless session bean, with very little coding involved by leveraging the JAX-WS specification and tooling. I will add this ability to the CRM EJB that I presented in an earlier post: http://www.zienit.nl/blog/2009/11/enterprise-java/web-services-made-easy-with-ejb-jpa-and-jax-ws. I will also explain how to bundle WSDL and XML Schema files with an EAR deployment file using a catalog, how to customize the JAX-WS generated code and how to design a single Maven build process for deployment to multiple environments (development, staging and production). Read more…

Introduction

Apache ServiceMix is an Enterprise Service Bus that is compliant to the Java Business Integration specification (JBI). In a nutshell, the JBI specification defines a robust and managed environment which supports components called Binding Components (BC’s) and Service Engines (SE’s), that exchange XML messages (with optional binary attachments) with each other. The goal of a Binding Component is to convert messages to and from a specific protocol (like SOAP over HTTP) to allow communication with the outside world. The goal of a Service Engine is to provide business logic (like message transformation, message routing, or any other type of business logic). Read more…

Web services made easy with EJB, JPA and JAX-WS

Comments Off November 4th, 2009 by Henri Bezemer

In this post I will share some code and findings that came out of an experiment with EJB 3.0, JPA (included in EJB 3.0) and JAX-WS (Java API for XML-Based Web Services) 2.0. My goal was to create a useful layer of web services on top of a database with as little Java code as possible. I wasn’t sure if the three technologies could be mixed together in a thin layer without running into serious trouble, so I decided to create an example application and test it on three popular open source Java Application Servers: Geronimo (2.1.4), Sun GlassFish Enterprise Server (2.1) and JBoss (5.1.0 GA). I’m running these Application Servers on Sun JDK 6. Read more…