JAVA JAX-WS Deployment (JAVA Eclipse EE IDE) -


this question has answer here:

i working on tutorial: http://java.dzone.com/articles/jax-ws-hello-world , i'm new of , looking assistance. step 5) run wspublisher. have project set in dynamic web project , when run wspublisher file use (1) run on server. im using apache tomcat/7.0.53. , end getting http status 404 - error. tips on 5 minute tutorial great understand further.

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 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());     } } 

this tutorial shows how host service without server. it's wrong publish web application on server way. server applications doesn't need main method. in order run ee application, need web.xml file.

follow tutorial: http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/ deploy jax-ws application on tomcat. hoever, tomcat servlet container, must provide jax-ws implementation yourself.

jee applications should hosted on ee servers - glassfish, tomcat ee or jboss, name few. have ee libraries built in.

take look: http://docs.oracle.com/javaee/6/tutorial/doc/bnayn.html


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -