Web Services CXF User Guide
Total Page:16
File Type:pdf, Size:1020Kb
JBoss Enterprise Application Platform 5 Web Services CXF User Guide for use with JBoss Enterprise Application Platform 5 Edition 5.2.0 Last Updated: 2017-10-13 JBoss Enterprise Application Platform 5 Web Services CXF User Guide for use with JBoss Enterprise Application Platform 5 Edition 5.2.0 Alessio Soldano Edited by Elspeth Thorne Eva Kopalova Petr Penicka Rebecca Newton Russell Dickenson Scott Mumford Legal Notice Copyright © 2012 Red Hat, Inc. This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Abstract This is a guide for installing and running JBoss Web Services CXF with JBoss Enterprise Application Platform 5 and its patch releases. It includes installation, configuration and tutorials. Table of Contents Table of Contents .C .H . A. P. T. .E . R. 1. .. I.N . T. .R . O. .D . U. .C . T. .I O. .N . .3 . .C .H . A. P. T. .E . R. 2. I. N. .S . T. A. .L . L. A. T. I. O. .N . .4 . .C .H . A. P. T. .E . R. 3. .S . E. .R . V. .E . R. S. I. D. .E . .I N. .T . E. G. .R . A. T. I. O. .N . .C . U. .S .T . O. .M . .I Z. .A . T. .I O. .N . .5 . .C .H . A. P. T. .E . R. 4. W. .S . .A . D. .D . R. .E . S. .S . I.N . G. .7 . 4.1. USING JAX-WS FOR ENABLING WS-ADDRESSING 7 4.1.1. Using CXF proprietary WSAddressingFeature 7 .C .H . A. P. T. .E . R. 5. .A . .D . D. .R . E. .S .S . I.N . G. T. .U . T. .O . R. .I A. L. .9 . 5.1. TURNING ON WS-ADDRESSING 1.0 12 .C .H . A. P. T. .E . R. 6. .W . .S . -. R. .E .L . I.A . B. .L . E. M. .E . S. .S .A . G. .I .N . G. .1 .4 . .C .H . A. P. T. .E . R. 7. .. .U . S. .I N. .G . .W . .S . -. R. .E .L . I.A . B. .L . E. M. .E . S. S. .A . G. .I .N . G. .1 .5 . .C .H . A. P. T. .E . R. 8. W. .S . -. R. .E .L . I.A . B. .L . E. M. .E . S. .S .A . G. .I .N . G. T. .U . T. O. .R . I. A. .L . .1 .8 . 8.1. GENERATING WSDL AND JAX-WS ENDPOINT ARTIFACTS 18 8.2. GENERATING JAX-WS CLIENT ARTIFACTS 21 8.3. TURNING ON WS-RM 1.0 22 .C .H . A. P. T. .E . R. 9. .W . .S . .P . O. .L .I .C .Y . F . R. .A . M. E. W. O. .R . K. 2. .9 . 9.1. USING THE POLICIES FEATURE 29 9.2. SPECIFYING THE LOCATION OF EXTERNAL ATTACHMENTS 29 .C .H . A. P. T. .E . R. 1. 0. W. S. .- .S .E . C. .U . R. .I T. .Y . .3 . 1. 10.1. OVERVIEW OF ENCRYPTION AND SIGNING 31 .C .H . A. P. T. .E . R. 1. 1.. W. S. .S .4 . J. S. E. .C . U. .R . I.T . Y. O. .N . .J . B. .O . S. .S . 3. .3 . 11.1. CREATING THE WEB SERVICE ENDPOINT 33 11.2. TURN ON WS-SECURITY 33 11.2.1. Package and deploy 36 11.3. WS-SECURITY POLICIES 37 11.4. AUTHENTICATION 39 11.4.1. Java Authentication and Authorization Service 44 11.5. FURTHER INFORMATION 47 11.5.1. Samples 47 11.5.2. Username/password configuration 48 11.5.3. Crypto Algorithms 48 .C .H . A. P. T. .E . R. 1. 2. .. .S . O. .A . P. M. E. S. .S . A. .G . E. L. O. .G . G. .I N. ..