Skip to content

Instantly share code, notes, and snippets.

@CaglarGonul
Created May 4, 2013 13:38
Show Gist options
  • Save CaglarGonul/5517545 to your computer and use it in GitHub Desktop.
Save CaglarGonul/5517545 to your computer and use it in GitHub Desktop.
A simple web service implementation.
package org.example.simplecalculationsservice;
import java.util.logging.Logger;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 2.7.4
* 2013-05-04T16:25:28.699+03:00
* Generated source version: 2.7.4
*
*/
@javax.jws.WebService(
serviceName = "SimpleCalculationsService",
portName = "SimpleCalculationsServiceSOAP",
targetNamespace = "http://www.example.org/SimpleCalculationsService/",
wsdlLocation = "file:/E:/WebServiceLearning/SimpleCalcProj/SimpleCalculationsService.wsdl",
endpointInterface = "org.example.simplecalculationsservice.SimpleCalculationsService")
public class SimpleCalculationsServiceImpl implements SimpleCalculationsService {
private static final Logger LOG = Logger.getLogger(SimpleCalculationsServiceImpl.class.getName());
/* (non-Javadoc)
* @see org.example.simplecalculationsservice.SimpleCalculationsService#calculateRectArea(org.example.simplecalculationsservice.Dimensions parameters )*
*/
public float calculateRectArea(Dimensions parameters) {
LOG.info("Executing operation calculateRectArea");
System.out.println(parameters);
try {
return parameters.getHeight()*parameters.getWidth();
} catch (java.lang.Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment