Java6 开发的Web Service, 发布https的wsdl地址(二)

来源:互联网 发布:mac网络还原 编辑:程序博客网 时间:2024/06/02 23:40

上回主要讲述了一下 如何开发Web Service的服务端程序。这次,阐述下如何打包服务端程序,在不需要eclipse的帮助下,启动服务端。

 

使用eclipse的export功能进行打包。

步骤:

(1)单击Project Name(如HelloWorld)右键,点击”export”,

(2)选择Java->Runnable JAR file,点击”Next”,

(3)选择对应的Launch configuration(如HelloWorld - HelloWorld),以及输入对应的Export destination(如D:\HelloWorld.jar),点击”Finish”。

在Export destination的目录下就出现了HelloWorld.jar。别忘了把密钥文件hello.keystore拷贝出来,放在刚刚的目录下。否则,将无法运行jar包。

 

运行方法(两种):

方式一:在cmd中输入  java -jar HelloWorld.jar。关闭命令窗口=jar包停止运行
方式二:双击HelloWorld.jar。在任务管理器中,关闭javaw.exe进程,jar包停止运行。

 

如有错误,欢迎大家指正。

 

参考资料:

(1)       http://stackoverflow.com/questions/4621313/using-javax-xml-ws-endpoint-with-https?answertab=active#tab-top

(2)       http://www.java.net/forum/topic/glassfish/metro-and-jaxb/publishing-jaxws-webservice-over-ssl-using-jdk-httpserver

(3)       http://www.iteye.com/topic/554929

 

原创粉丝点击