fromwsdl sample demonstrates the WSDL->Java programming model using an SSL HTTP
endpoint.
This sample only shows Transport Layer Security with no Mutual Authentication.
In particular, notice the web.xml how SSL is configured for the endpoint.
On the client-side, notice how the "javax.net.ssl.trustStore" and
"javax.net.ssl.trustStorePassword" jvmargs are passed during wsimport and
client execution.
For sample of TLS with Mutual auth with Glassfish, see
http://java.sun.com/developer/EJTechTips/2006/tt0527.html#1
Refer to the guide
(https://jax-ws.dev.java.net/guide/Configuring_SSL_and_Authorized_Users.html#ahidi)
for more samples with SSL.
* It has two operations with different MEPs
* in/out - addNumbers()
* oneway - onewayInt()
* etc - configuration files
* AddNumbers.wsdl wsdl file
* custom-client.xml client customization file
* custom-server.xml server customization file
* build.properties, deploy-targets.xml ant script to deploy the endpoint
war file
* sun-jaxws.xml deployment descriptor for web container
* web.xml with security defined
* deploy-targets.xml contains atgerts for deployment to Glassfish and
Tomcat.
It also contains targets for setting up tomcat keystore and client
truststore.
* src source files
* client/AddNumbersClient.java - client application
* server/AddNumberImpl.java - server implementation
* wsimport ant task is run to compile etc/AddNumbers.wsdl
* generates
SEI - AddNumbersPortType
service class - AddNumbersService
and exception class - AddNumbersFault_Exception
* To run with Glassfish V2 installed in developer profile (default).
-----------------------------------------------------------------------------
1) set JAXWS_HOME to the JAX-WS installation directory.
Set JAVA_HOME property.
Set AS_HOME property
2) Change domain.name property in etc/deploy-targets.xml to your hostname.
3) By default https port is configured as 8181 for this sample, which is
default https port in Glassfish.
If it is different from 8181, change the property "https.port" in
etc/deploy-targets.xml
4) This sample uses the default keystore in Glassfish and Glassfish is
preconfigured with HTTPS. Thre is no extra SSL configuration with Glassfish.
5) do 'ant clean server", this runs wsimport to compile AddNumbers.wsdl and
generate server side artifacts and does the deployment
6) run "ant client run"
This creates a client truststore in etc/certs directory by importing the
server certificate and runs wsimport on the published wsdl by the deployed
endpoint, by passing "javax.net.ssl.trustStore" and
"javax.net.ssl.trustStorePassword" jvmargs. It then compiles the generated
artifacts and the client application then executes it.
* To run with Tomcat 5.5 and later.
------------------------------------------------------------------------------
1) set JAXWS_HOME to the JAX-WS installation directory.
Set JAVA_HOME property.
Set CATALINA_HOME property to your Tomcat installation.
2) Change domain.name property in etc/deploy-targets.xml to your hostname.
By default https port is configured as 8181 for this sample. If you are
using tomcat, the default https port is 8443.
If it is different from 8181, change the property "https.port" in
etc/deploy-targets.xml
3) Tomcat does not have any keystore or trustStore by default. You also need to
enable SSL.
run "ant -Dtomcat=true setup-certs-tomcat", This creates a keystore
"tomcat.keystore" with a self-signed certificate for server and copies in
to ${CATALINA_HOME}/certs
4) Configure SSL in Tomcat
configured with SSL HTTP Connector on port 8443 in
$CATALINA_HOME/conf/server.xml
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="certs/tomcat.keystore"
keystorePass="changeit" />
Note: keystoreFile and keystorePass values
5) Restart Tomcat container.
6) do 'ant -Dtomcat=true clean server", this runs wsimport to compile
AddNumbers.wsdl and generate server side artifacts and does the deployment
7) run "ant -Dtomcat=true client run"
This creates a client truststore in etc/certs directory by importing the
server certificate and runs wsimport on the published wsdl by the deployed
endpoint, by passing "javax.net.ssl.trustStore" and
"javax.net.ssl.trustStorePassword" jvmargs. It then compiles the generated
artifacts and the client application then executes it.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Jax-WS所有jar包 (389个子文件)
wsgen.bat 3KB
wsimport.bat 3KB
default.css 4KB
default.css 3KB
Thumbs.db 8KB
bg_titlebar.gif 4KB
sunlogo.gif 2KB
d7_tab_bg.gif 1KB
a2_corner_tr.gif 110B
corner_navblue_tr.gif 75B
annotations.html 190KB
catalog.html 54KB
UsersGuide.html 43KB
why-wsaddressing.html 35KB
customizations.html 32KB
wsaddressing.html 29KB
apt.html 29KB
mtom-swaref.html 27KB
wsimportant.html 20KB
samples.html 19KB
ReleaseNotes.html 17KB
changelog.html 17KB
index.html 16KB
dispatch.html 14KB
handlers.html 13KB
wsgenant.html 13KB
wsimport.html 13KB
provider.html 12KB
wsgen.html 11KB
jaxws-war.html 11KB
soap12.html 10KB
asynch.html 8KB
statefulWebservice.html 7KB
jaxws-tools.html 7KB
ri-features.html 7KB
asyncprovider.html 5KB
endpoint.html 5KB
catalog-support.html 5KB
interop.html 5KB
community.html 5KB
index.html 4KB
jaxb-xjc.jar 3.03MB
jaxws-rt.jar 1.46MB
jaxb-impl.jar 876KB
woodstox.jar 642KB
jaxws-tools.jar 525KB
saaj-impl.jar 284KB
FastInfoset.jar 283KB
policy.jar 155KB
jaxb-api.jar 104KB
http.jar 82KB
resolver.jar 67KB
activation.jar 62KB
streambuffer.jar 58KB
jaxws-api.jar 53KB
management-api.jar 44KB
mimepull.jar 38KB
ha-api.jar 35KB
saaj-api.jar 24KB
jsr173_api.jar 23KB
jsr250-api.jar 22KB
gmbal-api-only.jar 21KB
stax-ex.jar 13KB
jsr181-api.jar 8KB
AddNumbersClient.java 17KB
AttachmentHelper.java 7KB
MimeApp.java 6KB
HelloAsyncImpl.java 6KB
AddNumbersClient.java 6KB
MtomApp.java 5KB
DispatchAddNumbersClient.java 5KB
MimeApp.java 5KB
AddNumbersClient.java 5KB
AddNumbersClient.java 5KB
MtomApp.java 5KB
MtomApp.java 5KB
LoggingHandler.java 5KB
Main.java 5KB
HelloAsyncImpl.java 5KB
HelloImpl.java 5KB
HelloImpl.java 4KB
Book.java 4KB
AddNumbersClient.java 4KB
AddNumbersClient.java 4KB
AddNumbersImpl.java 4KB
BookStore.java 4KB
UploadImpl.java 4KB
AsyncClient.java 4KB
HelloImpl.java 4KB
RetailerClient.java 4KB
CarBuyerApp.java 4KB
AddNumbersImpl.java 4KB
AddNumbersClient.java 4KB
LoggingHandler.java 4KB
LoggingHandler.java 4KB
MtomSampleImpl.java 3KB
MtomSampleImpl.java 3KB
AddNumbersClient.java 3KB
AddNumbersClient.java 3KB
AddNumbersImpl.java 3KB
共 389 条
- 1
- 2
- 3
- 4
笑傲江湖_adb
- 粉丝: 2
- 资源: 34
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页