Using the FUSE Services Framework Service Engine
Total Page:16
File Type:pdf, Size:1020Kb
FUSE ESB Using the FUSE Services Framework Service Engine Version 3.3 December 2007 Making Software Work Together™ Draft Draft Using the FUSE Services Framework Service Engine IONA Technologies Version 3.3 Published 12 May 2008 Copyright © 2001-2008 IONA Technologies PLC Trademark and Disclaimer Notice IONA Technologies PLC 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 IONA Technologies PLC, 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. IONA, IONA Technologies, the IONA logo, Orbix, High Performance Integration, Artix, FUSE, and Making Software Work Together are trademarks or registered trademarks of IONA Technologies PLC and/or its subsidiaries. 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 United States 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, IONA Technologies PLC 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. IONA 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. Copyright Notice 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 Draft Table of Contents Introduction to the FUSE Services Framework Service Engine ........................................................... 9 Developing a Service Using Java as a Starting Point ...................................................................... 11 Creating the SEI ............................................................................................................ 12 Annotating the Code ....................................................................................................... 15 Required Annotations ............................................................................................. 16 Optional Annotations .............................................................................................. 19 Developing a Service Using WSDL as a Starting Point ................................................................... 29 Creating a Service Unit to Deploy a Service ................................................................................. 33 Using MTOM to Process Binary Content ..................................................................................... 37 Using Message Interceptors ..................................................................................................... 39 A. Endpoint Properties ........................................................................................................... 41 B. Using the Maven Tooling ..................................................................................................... 43 Setting Up a FUSE ESB Project ......................................................................................... 44 A Service Unit Project ..................................................................................................... 46 A Service Assembly Project .............................................................................................. 47 Index .................................................................................................................................. 49 3 4 Draft Draft List of Tables 1. @WebService Properties ....................................................... 16 2. @SOAPBinding Properties ...................................................... 20 3. @WebMethod Properties ......................................................... 21 4. @RequestWrapper Properties ................................................. 22 5. @ResponseWrapper Properties ............................................... 23 6. @WebFault Properties ........................................................... 23 7. @WebParam Properties ........................................................... 25 8. @WebResult Properties ......................................................... 26 9. Optional Endpoint Attributes ................................................... 35 10. Elements Used to Configure an Endpoint's Interceptor Chain ......... 39 A.1. Endpoint Property Attributes ................................................ 41 A.2. Endpoint Property Beans ..................................................... 41 5 6 Draft Draft List of Examples 1. Simple SEI ......................................................................... 13 2. Simple Implementation Class .................................................. 14 3. Interface with the @WebService Annotation ............................... 17 4. Annotated Service Implementation Class ................................... 18 5. Specifying an RPC/LITERAL SOAP Binding with the @SOAPBinding Annotation ............................................................................. 20 6. SEI with Annotated Methods ................................................... 24 7. Fully Annotated SEI .............................................................. 26 8. FUSE Services Framework Code Generation Command .................. 29 9. Maven Configuration for Generating Starting Point Code From WSDL .................................................................................. 30 10. JBI Descriptor for a FUSE Services Framework Service Engine Service Unit ........................................................................... 33 11. Namespace Declaration for Using FUSE Services Framework Service Engine Endpoints .................................................................... 34 12. Simple Endpoint Configuration .............................................. 34 13. Adding a Jar to a Service Unit's Classpath ................................ 36 14. Configuring an Endpoint to Use MTOM .................................... 37 15. Method Using Binary Data ................................................... 38 16. Configuring an Interceptor Chain ............................................ 40 B.1. POM Elements for Using FUSE ESB Tooling ............................. 44 7 8 Draft Draft Introduction to the FUSE Services Framework Service Engine Summary The FUSE Services Framework service engine allows you to deploy JAX-WS based POJOs into the FUSE ESB and expose them as endpoints inside the ESB. Overview The FUSE Services Framework service engine allows you to develop services as annotated POJOs and deploy them as endpoints inside the ESB. Once the services are exposed inside the ESB other ESB endpoints can access the services they provide. When working with this service engine involves three steps: 1. Implementing your service logic as an annotated POJO. 2. Adding the needed configuration to your service unit. 3. Packaging the configuration and required jars into a service assembly for deployment. Key features The FUSE Services Framework service engine has the following features: • automatic WSDL generation • jsr181 support • JAX-WS Support • JAXB 2.0 support • MTOM support • Java proxy support Steps for working with the FUSE Using the FUSE Services Framework service engine to develop a service Services Framework service usually involves the following steps: engine 9 Draft Draft 1. Implementing the service's functionality using an annotated POJO. If you want to start with Java code see Developing a Service Using Java as a Starting Point. If you want to start with a WSDL contract see Developing a Service Using WSDL as a Starting Point. 2. Create a service unit to deploy the POJO into the FUSE Services Framework service engine. See Creating a Service Unit to Deploy a Service. 3. Bundle the service unit into a service assembly so it can be deployed into the FUSE ESB container. More information For more information about developing services using FUSE Services Framework see the FUSE Services Framework library. [http://open.iona.com/documentation/fuse-service-framework-documentation]. 10 Draft Draft Developing a Service Using Java as a Starting Point Summary Developing a service using a POJO is as simple as annotating your classes to add in the information needed to generate a WSDL contract. Table of Contents Creating the SEI .................................................................................................................... 12 Annotating the Code ............................................................................................................... 15 Required Annotations ....................................................................................................