lundi 23 février 2015

How does jax-ws work?



I have started learn JavaEE and don't understand one monemt. When I want create SOAP service and write a simply code like this:



package com.Paul;
import javax.jws.WebService;
import javax.jws.WebMethod;

@WebService
public class Hello {
private String message = new String("Hello, ");

public void Hello() {
}

@WebMethod
public String sayHello(String name) {
return message + name + ".";
}
}


it works very nice, but it works only with WildFly. GlassFish or Tomcat show me every time 404 error. why does it happen? And my next question - I didn't use any frameworks like Metro or smth else. Jax-ws only api - why does my code work?




Aucun commentaire:

Enregistrer un commentaire