Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

7.3. Developing the Service

At this point, you have learned enough to be able to construct the service. For simplicity, it will be assumed that the business logic is encapsulated within the following "pseudo-object:"
		  class AirlineReservationSystem
	public void reserveSeat (...);
	public void querySeat (...);
	public void upgradeSeat (...);


Develop business logic using Plain Old Java Objects, Enterprise Java Beans or Spring. The JBoss Enterprise SOA Platform provides out-of-the-box support for many different approaches.
The service action's processing becomes this:
public Message process (Message message) throws Exception
	String opcode = message.getBody().get(“org.example.flight.opcode”);
	if (opcode.equals(“reserve”))
	else if (opcode.equals(“query”))
	else if (opcode.equals(“upgrade”))
		throw new InvalidOpcode();
	return null;


As with WS-Addressing, you could use the message header's action field rather than embed the opcode within the message body. The drawback is that it will not work if multiple actions are chained together and if each of these needs a different opcode.