Java 7 JAX-WS Web Services
Copyright 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2012
Production Reference: 1140512
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-84968-720-1
www.packtpub.com
Cover Image by Mark Holland (<>
)
Credits
Author
Deepak Vohra
Reviewer
Jobin Kuruvilla
Acquisition Editor
Andrew Duckworth
Lead Technical Editor
Susmita Panda
Technical Editors
Conrad Neil
Mehreen Shaikh
Project Coordinator
Leena Purkait
Proofreader
Joanna McMahon
Indexer
Rekha Nair
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Author
Deepak Vohra is a consultant and a principal member of the NuBean.com software company. Deepak is a Sun Certified Java Programmer and a Web Component Developer. He has worked in the fields of XML and Java programming and J2EE for over five years. Deepak is the co-author of the book "Pro XML Development with Java Technology", Apress , and was the technical reviewer for the book "WebLogic: The Definitive Guide", O'Reilly . Deepak was also the technical reviewer for the book "Ruby Programming for the Absolute Beginner", Course Technology PTR , and the technical editor for the book "Prototype and Scriptaculous in Action", Manning Publications . Deepak is also the author of the books "JDBC 4.0 and Oracle JDeveloper for J2EE Development", Packt Publishing , "Processing XML documents with Oracle JDeveloper 11g", Packt Publishing , and "EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g", Packt Publishing .
About the Reviewer
Jobin Kuruvilla is an Atlassian Consultant who is experienced in customizing Atlassian products and writing plugins for various customers. He is working with Go2group, a premier Atlassian partner, and is involved in managing Atlassian products for both big enterprises and small starter license installations.
Jobin had started his career as a Java/J2EE Developer in one of the biggest IT companies in India. After spending the initial years in the SOA world, he got hooked on to the Atlassian Toolset and was soon impressed with its power.
He is the author of " JIRA Development Cookbook", Packt Publsihing , which was published in November 2011.
Jobin also runs a website named J Tricks Little JIRA Tricks (http://www.j-tricks.com). He has written numerous tutorials to help the developer community, who he thinks has contributed immensely to his personal development.
Dedicated to my daughter, Anna, my wife, Anu, my sister, Juby, and my parents and in-laws.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise
on Twitter, or the Packt Enterprise Facebook page.
Preface
Java 7 JAX-WS Web Services starts off with downloading and installing the Oracle GlassFish Server and NetBeans IDE. Although in this book we will be using GlassFish Server 3.1.1 and NetBeans IDE 7.0.1, later versions of GlassFish and NetBeans are also compatible. We then create a JAX-WS web service with Java 7. We shall also discuss the new -clientjar
option in the wsimport
tool or the wsimport
Ant task which is used to generate JAX-WS portable artifacts from a service WSDL. Subsequently, we use the web service artifacts to invoke the web service from a web service client.
What this book covers
In , Setting the Environment , we set the environment for this book including installing the required software such as NetBeans IDE and the Oracle GlassFish Server.
In , Developing a JAX-WS Web Service , we discuss how the new clientjar
option in the wsimport
tool/Ant task in Java 7 is used for developing a JAX WS web service. We use NetBeans IDE 7 and the Oracle GlassFish Server, which support Java 7.
Who this book is for
The target audience of the book is web service developers. Prior knowledge of JAX-WS web services including the wsimport
tool and the Ant task is required. The book is also suitable for developers who want to learn about some of the new features in Java 7. If you use NetBeans-Glassfish for Java EE development you would be interested in how the new wsimport clientjar
option may be leveraged to simplify web service development.
What you need for this book
The following software is required for the sample applications in the book:
- Oracle GlassFish Server 3.1.1 or later
- NetBeans IDE 7.0.1 or later
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.