Skip to content

Instantly share code, notes, and snippets.

@aziz781
Created October 26, 2011 14:05
Show Gist options
  • Save aziz781/1316460 to your computer and use it in GitHub Desktop.
Save aziz781/1316460 to your computer and use it in GitHub Desktop.
Developing Web Services using jax-ws, spring and maven
//TemperatureServiceImple .java
package uk.co.mo.training.ws;
import javax.jws.WebService;
import org.springframework.stereotype.Service;
@SuppressWarnings("restriction")
@WebService(endpointInterface = "uk.co.mo.training.ws.TemperatureService",serviceName="temperatureService")
@Service
public class TemperatureServiceImple implements TemperatureService {
public double toCelsius(double fahrenheit) {
double celsius = (5.0 / 9.0) * (fahrenheit - 32.0);
//C° = (5 / 9)x (F° - 32)
return celsius;
}
public double toFahrenheit(double celsius) {
double fahrenheit = (celsius *1.8)+32.0;
//F° = (C° x 1.8) + 32
return fahrenheit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment