Je travaille actuellement sur ce tutoriel: http://java.dzone.com/articles/jax-ws-hello-world et je suis nouveau dans tout cela et je cherche de l'aide. J'arrive à l'étape 5) où je lance le WSPublisher. J'ai donc le projet mis en place dans un projet Web dynamique et quand j'exécute le fichier WSPublisher j'utilise (1) Exécuter sur le serveur. Im actuellement en utilisant Apache Tomcat/7.0.53. Et je finis par obtenir une erreur HTTP Status 404. Tous les conseils sur ce tutoriel de 5 minutes serait super car je pourrais facilement le comprendre plus loin.Déploiement JAVA JAX-WS (IDE JAVA Eclipse EE)
package juma.mohammad;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface Greeting {
@WebMethod String sayHello(String name);
}
..
package juma.mohammad;
import javax.jws.WebService;
@WebService(endpointInterface = "juma.mohammad.Greeting")
public class GreetingImpl implements Greeting {
@Override
public String sayHello(String name) {
return "Hello, Welcom to jax-ws " + name;
}
}
..
package juma;
import javax.xml.ws.Endpoint;
import juma.mohammad.GreetingImpl;
public class WSPublisher {
public static void main(String[] args) {
Endpoint.publish("http://localhost:8080/WS/Greeting",new GreetingImpl());
}
}
Si vous utilisez Eclipse exécutez simplement la classe principale à savoir WSPublisher. Votre webservice sera maintenant hébergé. Pas besoin de faire quoi que ce soit. Maintenant, téléchargez soap ui et utilisez-le comme client en important votre wsdl i.e. http: // localhost: 8080/WS/Greeting? Wsdl – kingAm