Developing and Deploying JAX-WS Services with FUSE™ ESB
Total Page:16
File Type:pdf, Size:1020Kb
FUSE™ ESB Developing and Deploying JAX-WS Services with FUSE™ ESB Version 4.0 October 2008 Draft Developing and Deploying JAX-WS Services with FUSE™ ESB Version 4.0 Published 10 Nov 2008 Copyright © 2008 IONA Technologies PLC, a wholly-owned subsidiary of Progress Software Corporation. Legal Notices Progress Software Corporation and/or its subsidiaries may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this publication. Except as expressly provided in any written license agreement from Progress Software Corporation, the furnishing of this publication does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Any rights not expressly granted herein are reserved. Progress, IONA, IONA Technologies, the IONA logo, Orbix, High Performance Integration, Artix;, FUSE, and Making Software Work Together are trademarks or registered trademarks of Progress Software Corporation and/or its subsidiaries in the US and other countries. Java and J2EE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. CORBA is a trademark or registered trademark of the Object Management Group, Inc. in the US and other countries. All other trademarks that appear herein are the property of their respective owners. While the information in this publication is believed to be accurate Progress Software Corporation makes no warranty of any kind to this material including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Progress Software Corporation shall not be liable for errors contained herein, or for incidental or consequential damages in connection with the furnishing, performance or use of this material. All products or services mentioned in this manual are covered by the trademarks, service marks, or product names as designated by the companies who market those products. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, photocopying, recording or otherwise, without prior written consent of IONA Technologies PLC. No third-party intellectual property right liability is assumed with respect to the use of the information contained herein. IONA Technologies PLC assumes no responsibility for errors or omissions contained in this publication. This publication and features described herein are subject to change without notice. Portions of this document may include Apache Foundation documentation, all rights reserved. Draft Table of Contents Introduction ......................................................................................................................... 11 I. Developing JAX-WS Applications ............................................................................................ 13 Developing a Service Using Java as a Starting Point .............................................................. 15 Creating the SEI .................................................................................................... 16 Annotating the Code ............................................................................................... 19 Required Annotations ..................................................................................... 20 Optional Annotations ...................................................................................... 23 Developing a Service Using WSDL as a Starting Point ........................................................... 33 II. Configuring Your Applications ............................................................................................... 37 Configuring Service Endpoints .......................................................................................... 39 Using the jaxws:endpoint Element ............................................................................. 40 Using the jaxws:server Element ................................................................................. 43 Adding Functionality to Service Providers ..................................................................... 46 Configuring the HTTP Transport ........................................................................................ 49 Configuring a Consumer .......................................................................................... 50 Using Configuration ........................................................................................ 51 Using WSDL ................................................................................................. 56 Consumer Cache Control Directives .................................................................... 57 Configuring a Service Provider ................................................................................... 58 Using Configuration ........................................................................................ 59 Using WSDL ................................................................................................. 63 Service Provider Cache Control Directives ............................................................ 64 Using the HTTP Transport in Decoupled Mode .............................................................. 65 Configuring the JMS Transport ......................................................................................... 71 Basic Endpoint Configuration .................................................................................... 72 Using Configuration ........................................................................................ 73 Using WSDL ................................................................................................. 77 Using a Named Reply Destination ...................................................................... 78 Consumer Endpoint Configuration .............................................................................. 79 Using Configuration ........................................................................................ 80 Using WSDL ................................................................................................. 81 Provider Endpoint Configuration ................................................................................ 82 Using Configuration ........................................................................................ 83 Using WSDL ................................................................................................. 85 JMS Runtime Configuration ...................................................................................... 86 JMS Session Pool Configuration ......................................................................... 87 Consumer Specific Runtime Configuration ............................................................ 88 Provider Specific Runtime Configuration .............................................................. 89 FUSE Services Framework Logging ................................................................................... 91 Overview of FUSE Services Framework Logging ............................................................. 92 Simple Example of Using Logging .............................................................................. 94 3 Draft Default logging.properties File ................................................................................... 96 Configuring Logging Output .............................................................................. 97 Configuring Logging Levels ............................................................................... 99 Enabling Logging at the Command Line ..................................................................... 100 Logging for Subsystems and Services ........................................................................ 101 Logging Message Content ....................................................................................... 103 Deploying WS-Addressing ............................................................................................. 107 Introduction to WS-Addressing ................................................................................ 108 WS-Addressing Interceptors .................................................................................... 109 Enabling WS-Addressing ........................................................................................ 110 Configuring WS-Addressing Attributes ....................................................................... 112 Enabling Reliable Messaging .......................................................................................... 115 Introduction to WS-RM .......................................................................................... 116 WS-RM Interceptors ............................................................................................. 118 Enabling WS-RM ................................................................................................. 120 Configuring WS-RM .............................................................................................. 124 Configuring FUSE Services Framework-Specific WS-RM Attributes ............................ 125 Configuring Standard WS-RM Policy Attributes .................................................... 127 WS-RM Configuration Use Cases ..................................................................... 131 Configuring WS-RM Persistence ..............................................................................