首页计算机书籍计算机语言《Java Web服务构建与运行 影印版》Martin Kalin
yewei

文档

313

关注

0

好评

0
PDF

《Java Web服务构建与运行 影印版》Martin Kalin

阅读 542 下载 0 大小 21.99M 总页数 315 页 2022-11-22 分享
价格:¥ 10.00
下载文档
/ 315
全屏查看
《Java Web服务构建与运行 影印版》Martin Kalin
还有 315 页未读 ,您可以 继续阅读 或 下载文档
1、本文档共计 315 页,下载后文档不带www.pdfdz.com水印,支持完整阅读内容。
2、古籍基本都为PDF扫描版,所以文档不支持编辑功能,即不支持文档内文字的复制粘贴。
3、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
4、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
5、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。
PrefaceThis is a book for programmers interested in developing Java web services and Javaclients against web services,whatever the implementation language.The book is a code-driven introduction to JAX-WS (Java API for XML-Web Services),the framework ofchoice for Java web services,whether SOAP-based or REST-style.My approach is tointerpret JAX-WS broadly and,therefore,to include leading-edge developments suchas the Jersey project for REST-style web services,officially known as JAX-RS (Java APIfor XML-RESTful Web Services).JAX-WS is bundled into the Metro Web Services Stack,or Metro for short.Metro is partof core Java,starting with Standard Edition 6 (hereafter,core Java 6).However,theMetro releases outpace the core Java releases.The current Metro release can be down-loaded separately from s://wsit.dev.java.net.Metro is also integrated into the Sunapplication server,GlassFish.Given these options,this book's examples are deployedin four different ways:Core Java onlyThis is the low-fuss approach that kes it easy to get web services and their clientsup and running.The only required software is the Java software development kit(SDK),core Java 6 or later.Web services can be deployed easily using the Endpoint,HttpServer,and HttpsServer classes.The early examples take this approach.Core Java with the current Metro releaseThis approach takes advantage of Metro features not yet available in the core Javabundle.In general,each Metro release kes it easier to write web services andclients.The current Metro release also indicates where JAX-WS is moving.TheMetro release also can be used with core Java 5 if core Java 6 is not an option.Standalone TomcatThis approach builds on the familiarity among Java programmers with standaloneweb containers such as Apache Tomcat,which is the reference implementation.Web services can be deployed using a web container in essentially the same wayas are servlets,JavaServer Pages (JSP)scripts,and JavaServer Faces (JSF)scripts.Astandalone web container such as Tomcat is also a good way to introducecontainer-naged security for web services.GlassFishThis approach allows deployed web services to interact naturally with otherenterprise components such as Java Message Service topics and queues,a JNDI(Java Naming and Directory Intece)provider,a backend database system andthe @Entity instances that mediate between an application and the database sys-tem,and an EJB(Enterprise Java Bean)container.The EJB container is importantbecause a web service can be deployed as a stateless Session EJB,which bringsadvantages such as container-naged thread safety.GlassFish works seamlesslywith Metro,including its advanced features,and with popular IDEs(IntegratedDevelopment Environment)such as NetBeans and Eclipse.An appealing feature of JAX-WS is that the API can be separated cleanly from deploy-ment options.One and the same web service can be deployed in different ways to suitdifferent needs.Core Java alone is good for learning,development,and even lightweightdeployment.A standalone web container such as Tomcat provides additional support.A Java application server such as GlassFish promotes easy integration of web serviceswith other enterprise technologies.Code-Driven ApproachMy code examples are short enough to highlight key features of JAX-WS but also re-alistic enough to show off the production-level capabilities that come with the JAX-WSframework.Each code example is given in full,including all of the import statementsMy approach is to begin with a relatively sparse example and then to add and modifyfeatures.The code samples vary in length from a few statements to several pages ofsource.The code is deliberately modular.Whenever there is a choice between con-ciseness and clarity in coding,I try to opt for clarity.The examples come with instructions for compiling and deploying the web servicesand for testing the service against sample clients.This approach presents the choicesthat JAX-WS kes available to the programmer but also encourages a clear and thor-ough ysis of the JAX-WS libraries and utilities.My goal is to furnish code samplesthat can serve as templates for commercial applications.JAX-WS is a rich API that is explored best in a mix of overview and examples.My aimis to explain key features about the architecture of web services but,above all,to illus-trate each jor feature with code examples that perform as advertised.Architecturewithout code is empty;code without architecture is blind.My approach is to integratethe two throughout the book.Web services are a modern,lightweight approach to distributed software systems,thatis,systems such as eil or the World Wide Web that require different software com-ponents to execute on physically distinct devices.The devices can range from largeservers through personal desktop chines to handhelds of various types.Distributedsystems are complicated because they are de up of networked components.There
返回顶部