java - JAX-WS service deployment -


i new web service programming , trying create jax-ws web-service. have created following jax-ws web service in eclipse:

creating service interface:

package test; @webservice @soapbinding(style = style.rpc) public interface additionservice {       @webmethod     int add(int a,int b);  } 

after 1 implementation class:

package test; @webservice(endpointinterface = "test.additionservice") public class additionserviceimpl implements additionservice{      @override     public int add(int a, int b) {         return a+b;          } } 

last step: using following code publishing service:

package test; public class addtionservicepublisher {     public static void main(string[] args) {         endpoint.publish ("http://localhost:9999/ws/additionservice",  new additionserviceimpl());      } } 

i can view wsdl using bellow local url: http://localhost:9999/ws/additionservice?wsdl

but don't have server installed. how, getting published? server inbuilt eclipse?

the oracle java documentation states following

creates , publishes endpoint specified implementor object @ given address. necessary server infrastructure created , configured jax-ws implementation using default configuration.

as jax-ws part of java se package, means underlying server depending on kind of jvm running program at. e.g. on laptop running java 8 openjdk, in instance of "com.sun.net.httpserver.httpserver" created.

the fastest way find out server ist started in environment, jump (decompiled) code of endoint.java , implementation(s).

if want create standalone, selfrunning webservice-jar might interested take @ spring-ws (with spring boot) or dropwizard.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -