Archive for the tag 'soaphandler'

Jun 29 2008

Contract First Web Services with Spring 2 and JAX-WS



This short blog entry will show you how easily you can integrate JAX-WS into a Spring 2 Project. The example sourcecode is depending on my previous blog How to modify JAX-WS SOAP-Messages and i am using NetBeans 6.1.


Prerequisites

Download the JAX-WS commons and XBean.


Transform the SOAP Web Services Project into a Spring Project

First open the Non-Spring-Project “How to modify JAX-WS SOAP-Messages“, switch to the project-properties and add the XBean, JAX-WS commons and Spring Framework 2.5 JAR-files.

add jar files to netbeans project


You can see in this picture which JAR-files have to be included in the project:

jar files in the netbeans project


Now you have to create the Spring Configuration file. Create the new XML-file: /WEB-INF/applicationContext.xml. If you are using NetBeans 6.1, navigate to File->New File->Spring Framework->Spring XML Configuration File.

create a new spring configuration file in netbeans 6.1


Replace the content with this:

applicationContext.xml

Technorati Tags: Java, jax-ws, NetBeans, soap, soaphandler, Spring, web services

4 responses so far

Mrz 16 2008

Creating generic SOAP Web Services

Published by under Java,web services



This blog is about how a generic soap web service can work. It is a productive concept which i have developed for a real world application. I tried to keep this basic concept as simple as possible.

In a future blog-entry, i will show a NetBeans example for this. Please be patient, it takes much time to create it.

Consider this scenario, you are creating a SOAP Web Service which has only one operation, it is called “processOperation()“. The Request for this operation needs 4 data type elements:

Technorati Tags: generic, soap, soaphandler, web services, xpath, xslt

5 responses so far

Mrz 08 2008

How to modify JAX-WS SOAP-Messages



This blog is depending on my previous blog Creating SOAP Web Services with NetBeans 6. You can download the needed sourcecode there.

Here i will show how you can modify the JAX-WS SOAP-Message before the outgoing SOAP-Response will pass the specified Web Service Operation. This is sometimes necessary, when some recipients want to receive their own special SOAP-Headers. You can also modify the incoming Request to read special informations, which are included in the SOAP-Header, but this is not part of this posting (maybe i will show it in an other upcoming blog).

For this example i am using JAX-WS 2.1 with NetBeans 6.0 .


ServerSOAPHandler.java

This is the core-class of this example. Before the Request/Response pass the
Web Service Operation, it can be handled here in the method

Technorati Tags: Java, jax-ws, NetBeans, soap, soaphandler, web services

13 responses so far