OpenVMS Source Code Demos

simpleservice2

//==================================================================================
// title : SimpleService2.java (SOAP-based web service for Apache AXIS2)
// author: Neil Rieck
// notes : 1) This is the service implementation class
//         2) the "ss" prefix means "simple service"
//	   3) @WebParam is used to force the wsdl to publish my names
//==================================================================================
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
public class SimpleService2 {
	//
	// This method will be exposed as operation ssAdd
	//
	public double ssAdd(		@WebParam(name = "ssValue1")	double ssValue1,
					@WebParam(name = "ssValue2")	double ssValue2) {
		return (ssValue1 + ssValue2);
	}
	//
	// This method will be exposed as operation ssSubtract
	//
	public double ssSubtract(	@WebParam(name = "ssValue3")	double ssValue3,
					@WebParam(name = "ssValue4")	double ssValue4) {
		return (ssValue3 - ssValue4);
	}
	//
	// This method will be exposed as operation ssEcho
	//
	public String ssEcho(		@WebParam(name = "ssValue5")	String ssValue5) {
		return ("You sent: "+ ssValue5);
	}
}

home Back to Home
Neil Rieck
Waterloo, Ontario, Canada.