Random

A Framework-less Java SOAP Service

I’m a heavy user of Apache CXF which uses Spring for configuration. I’m a big fan of it’s customisability and feature-richness, but sometimes in a sea of features we forget how simple things can be! So now I’m currently writing some training material on JAX-WS and have been trying to create a simple 1 slide example of a SOAP Service. Here goes:

package uk.co.mattgoldspink;
import javax.jws.*;
@WebService
public class HelloService {
 @WebMethod
 public String greet(@WebParam String request)
 {
 return "Hello, " + request;
 }
 public static void main(String[] args)
 {

 new HelloService());
 }
}

That’s it! Just a JDK required.

Author: Matt Goldspink

I'm a web developer based in the UK. I'm currently UI Architect at Vlocity, Inc, developing UI's on the Salesforce platform using a mix of Web Components, Angular.js and Lightning.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.