当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

《IBM WebSphere Application Server》教程:P10-WASv6_WebServices

资源类别:文库,文档格式:PDF,文档页数:21,文件大小:585.82KB,团购合买
点击下载完整版文档(PDF)

I IBM Software Group IBM Web Sphere Application Server v6 J2EE 1.4 Web Services in WebSphere 叫 ND: DBI%删E IBM Proof of Technology O2005 3M Corporasan IBM Product Introduction Exploration Organization IBM Software Group I Web Sphere software Agenda Web services Basics Web Sphere Support for WebServices Web Services Interoperability(Ws-I) a WS-Securit Web Services gateway and SIBWs UDDI/JAXR

1 ® IBM Software Group © 2005 IBM Corporation IBM Proof of Technology IBM Product Introduction + Exploration Organization IBM WebSphere Application Server v6 J2EE 1.4 Web Services in WebSphere IBM Software Group | WebSphere software WebSphere Application Server v6 2 Agenda ƒ Web Services Basics ƒ WebSphere Support for WebServices ƒ Web Services Interoperability (WS-I) ƒ WS-Security ƒ WebServices Gateway and SIBWS ƒ UDDI/JAXR

What are Web Services? Web Services are standards-based, interoperable, self contained, modular applications that can be described, published, located and invoked over the internet Web Services can be new applications or expose existing legacy systems using new XML based protocol Services can rely on other services to achieve the goals and participate in a Business Process There are three fundamental standards b Web Services are described with WSDL (Web Services Definition Language) b Web Services usually are conveyed using the SOAP XML b Web Services may be discovered using UDDI IBM Software Group I Web Sphere software Tying Web Services Registry 2. Find MSDL SOAP Provider

2 IBM Software Group | WebSphere software WebSphere Application Server v6 3 What are Web Services? ƒ Web Services are standards-based, interoperable, self￾contained, modular applications that can be described, published, located, and invoked over the internet  Web Services can be new applications or expose existing legacy systems using new XML based protocol  Services can rely on other services to achieve the goals and participate in a Business Process ƒ There are three fundamental standards  Web Services are described with WSDL (Web Services Definition Language)  Web Services usually are conveyed using the SOAP XML Messaging protocol  Web Services may be discovered using UDDI IBM Software Group | WebSphere software WebSphere Application Server v6 4 Tying Web Services 2. Find 1. Publish 3. Bind (invoke) SOAP WSDL Service Requestor Service Provider Service Registry - UDDI - Note: Service Registry is Optional. The Requestor may get WSDL from other places than the Registry

BM Software Group WebSphere software The Parts of a Web service Solution There are three major parts to a Web Services Solution 1. Programming model How you write clients to access web services How you write service implementations ° How isⅩ ML mapped to objects andle other parts of the SOAP spec(headers, 2. Deployment model Deployment descriptors to map service implementations to SOAP messages Type mapping for parameters(at least in RPC) 3. SOAP engine Code to receive SoAP messages and invoke service Code to map Java types to XML IBM Software Group I Web Sphere software Veb services in J2EE J2EE 1.4 specifies J2EE architecture for web services . Container contracts JSR 101 Container b Service implementations are hidden from the clie

3 IBM Software Group | WebSphere software WebSphere Application Server v6 5 The Parts of a Web Service Solution ƒ There are three major parts to a Web Services Solution  1. Programming model ƒ How you write clients to access web services ƒ How you write service implementations ƒ How is XML mapped to objects ƒ How you handle other parts of the SOAP spec (headers, attachments, etc.)  2. Deployment model ƒ Deployment descriptors to map service implementations to SOAP messages ƒ Type mapping for parameters (at least in RPC)  3. SOAP engine ƒ Code to receive SOAP messages and invoke service implementations ƒ Code to map Java types to XML IBM Software Group | WebSphere software WebSphere Application Server v6 6 Web Services in J2EE ƒ J2EE 1.4 specifies J2EE architecture for web services JSR 109 ƒClient programming model ƒDeployment model ƒContainer contracts JSR 101 ƒWSDL Java mapping ƒ Extends existing J2EE architecture. Ports are service instances created by the container SEI exposes Java interface of service Client invokes a port stub that implements the SEI Service implementations are hidden from the client ƒStateless session bean ƒServlet Service Endpoint Interface Service Impl Port Container Service Interface Client

BM Software Group WebSphere software Section Web Services in Web Sphere V6 IBM Software Group I Web Sphere software Web Services and XML Highlights Standards Portability -XML Schema definitions for all deployment descriptors JAX-P 1.2-New properties for XMl parsers JAX-R-XML registry API JAX-RPC -APls for representing WSDL-based services as RPCs in Java(and vice-versa) JSR 109-Web services programming and deployment model SAAJ 1.2-SOAP Attachments aPl for java WS-1- Ability to create Ws-I compliant services

4 IBM Software Group | WebSphere software WebSphere Application Server v6 7 Web Services in WebSphere V6 Web Services in WebSphere V6 Section IBM Software Group | WebSphere software WebSphere Application Server v6 8 Web Services and XML Highlights ƒ Standards / Portability - XML Schema definitions for all deployment descriptors ƒ JAX-P 1.2 - New properties for XML parsers ƒ JAX-R - XML registry API ƒ JAX-RPC - APIs for representing WSDL-based services as RPCs in Java (and vice-versa) ƒ JSR 109 - Web services programming and deployment model ƒ SAAJ 1.2 - SOAP Attachments API for Java ƒ WS-I – Ability to create WS-I compliant services

Changes in Web Services JAX-RPC (JSR-101)1.1 New standard APl for rogramming Web services in model and engine JsR-1091.0 New J2EE deployment model forJSR-109-WSEE Java Web services E 1.4 schema type DD moving services didn't exist SAAJ 1.1 Not wS compliant ervice endpoint interface(SEl)is a peer to WS-Security for manipulating SoAP XML messages WS- Basic Profile 1.0 t ane osw extends DoM (easy ame Token Profile 1.0 Apache soap 2.3 WS-I Basic Profile 1.1 Chent udDi v3 api differe IBM Software Group I Web Sphere software New Web Service Features Based on specific customer requests for new functionall Custom bindings Generic SoAP elements Multi-Protocol support Caching

5 IBM Software Group | WebSphere software WebSphere Application Server v6 9 WebSphere 4.0 & 5.0 WebSphere 5.02/5.1 WebSphere 6.0 JAX-RPC (JSR-101) 1.0 ƒ New standard API for programming Web services in Java JSR-109 1.0 ƒ New J2EE deployment model for Java Web services SAAJ 1.1 WS-Security ƒ Extensions added WS-I Basic Profile 1.0 ƒ Profile compliance UDDI4J version 2.0 (client) Apache Soap 2.3 enhancements The engine is a new high performance SOAP engine supporting both HTTP and JMS JAX-RPC (JSR-101) 1.1 ƒ Additional type support ƒ xsd:list ƒ Fault support ƒ Name collision rules ƒ New APIs for creating Services ƒ isUserInRole() JSR-109 - WSEE ƒ Moved to J2EE 1.4 schema types ƒ Migration of web services client DD moving to appropriate container DDs ƒ Handlers support for EJBs ƒ Service endpoint interface (SEI) is a peer to LI/RI SAAJ 1.2 ƒ APIs for manipulating SOAP XML messages ƒ SAAJ infrastructure now extends DOM (easy to cast to DOM and use) WS-Security ƒ WSS 1.0 ƒ Username Token Profile 1.0 ƒ X.509 Token Profile 1.0 WS-I Basic Profile 1.1 ƒ Attachments support JAXR support UDDI v3 support ƒ Includes both the registry implementation and the client API library ƒ Client UDDI v3 API different than JAXR (exposes more native UDDI v3 functionality) Changes in Web Services Apache SOAP ƒ The programming model, deployment model and engine Proprietary APIs ƒ Because Java standards for Web services didn’t exist Not WS-I compliant IBM Software Group | WebSphere software WebSphere Application Server v6 10 New Web Service Features Based on specific customer requests for new functionality ƒ Custom bindings ƒ Generic SOAP elements ƒ Multi-Protocol support ƒ Caching

Custom Bindings JAX-RPC does not support all schema types b Unsupported types can be mapped to literal XML elements epresented as soAP elements b This works well for data-centric applications, but not very well for type-centric applications b Users may want to map schemas to custom or legacy Java types A new CustomBinder interface is provided to be implemented by the binding provider b A CustomBinder deals with a particular pair of XML schema type b 2 primary methods: Serialize and Deserialize IBM Software Group I Web Sphere software Custom Bindings: EXample JAX-RPC binds XML data to specific Java type b Certain designs may want to override this automatic Custom Bindings allow the developer to choose the mapping The SoAP message must use the Literal style Document/Literal or rPc/Literal ava to XML Request XML to Java Mapping Mapping SOAP Providet XML to Java Java to X Mapping Mapping Response WebSphere Applicatron Server v6

6 IBM Software Group | WebSphere software WebSphere Application Server v6 11 Custom Bindings ƒ JAX-RPC does not support all schema types Unsupported types can be mapped to literal XML elements represented as SOAP elements This works well for data-centric applications, but not very well for type-centric applications Users may want to map schemas to custom or legacy Java types ƒ A new CustomBinder interface is provided to be implemented by the binding provider A CustomBinder deals with a particular pair of XML schema type and Java type 2 primary methods; Serialize and Deserialize IBM Software Group | WebSphere software WebSphere Application Server v6 12 Custom Bindings: Example ƒ JAX-RPC binds XML data to specific Java types Certain designs may want to override this automatic choice ƒ Custom Bindings allow the developer to choose the mapping rules ƒ The SOAP message must use the Literal style Document/Literal or RPC/Literal Provider JAX-RPC Client Java to XML Mapping XML to Java Mapping XML to Java Mapping Java to XML Mapping Request Response SOAP Messages 1 2 4 3 Custom Binding Custom Binding

Generic SoAP Elements Custom Bindings allows for the specified JAX-RPC bindings to be extended or changed Certain designs may prefer to eliminate the binding completely b Support for generic SoAP elements gives the developer the ability to disable the normal deserialization process b Improves performance of Services that do not require their XML bound to Java type Normal binding public Bean echo(Bean bean) Generic bir public SoAPElement echo(soAPElement bean) IBM Software Group I Web Sphere software Generic SOAP Elements: Example WSDL2Java contains a new option - Binding b Disables normal deserialization, instead all objects will be returned bound to the sAAj SoAPElement APl The SAAJ API will provide a new method for accessing the xml string that represents the SoAPElement tree b Public final String toXMLString(-.) SoapElement XML Data Deserialization Hello Hello Word Worid </c WebSphere Applicatron

7 IBM Software Group | WebSphere software WebSphere Application Server v6 13 Generic SOAP Elements ƒ Custom Bindings allows for the specified JAX-RPC bindings to be extended or changed ƒ Certain designs may prefer to eliminate the binding completely Support for generic SOAP elements gives the developer the ability to disable the normal deserialization process Improves performance of Services that do not require their XML bound to Java types ƒ Normal binding: public Bean echo(Bean bean); ƒ Generic binding: public SOAPElement echo(SOAPElement bean); IBM Software Group | WebSphere software WebSphere Application Server v6 14 SoapElement Generic SOAP Elements: Example ƒ WSDL2Java contains a new option –noDataBinding Disables normal deserialization, instead all objects will be returned bound to the SAAJ SOAPElement API ƒ The SAAJ API will provide a new method for accessing the xml string that represents the SOAPElement tree Public final String toXMLString(…) Hello World Hello World XML Data Deserialization

Multi Protocol Support Extends JAX-RPC support for invoking remote stateless session ejBs with RMi-IIOP b More performant method for calling EJB services This allows managed clients(defined by JSR 109 )to access Web Services through a number of protocols No changes to the JAX-RPC client are needed May be extended to include other protocols in the future IBM Software Group I Web Sphere software Multi Protocol Support: Invocation Changes RMl-HIOP Applcation Serv Now Direct EB invocation Works for stateless Session Beans

8 IBM Software Group | WebSphere software WebSphere Application Server v6 15 Multi Protocol Support ƒ Extends JAX-RPC support for invoking remote stateless session EJBs with RMI-IIOP More performant method for calling EJB services ƒ This allows managed clients (defined by JSR 109) to access Web Services through a number of protocols No changes to the JAX-RPC client are needed May be extended to include other protocols in the future IBM Software Group | WebSphere software WebSphere Application Server v6 16 Multi Protocol Support: Invocation Changes Java Bean Service Web service client JAX-RPC SOAP router servlet Application Server Web Container EJB Container Client Container SOAP router servlet SSB Service JNDI Web service client JAX-RPC JNDI SSB Service Application Server Web Container EJB Container Client Container Existing SOAP/HTTP Invocation New Direct EJB Invocation Works for Stateless Session Beans SOAP RMI-IIOP

BM Software Group WebSphere software Caching Cacheable objects >JSPs Java objects Commands Can cache portions of pages and responses Client Caching IBM Software Group I Web Sphere software Client Caching Increases the performance of Web services clients by caching responses from remote Web Services Once a response is cached, subsequent calls to the same web service with the same set of request parameters could be Provided as a jAX-RPC handler b Based on the poll Choice of methods to invalidate cached values Rule Based. Time Based. APls

9 IBM Software Group | WebSphere software WebSphere Application Server v6 17 Caching ƒ Cacheable objects Servlets JSPs Java objects Commands Server-side web services ƒ Can cache portions of pages and responses ƒ Client Caching IBM Software Group | WebSphere software WebSphere Application Server v6 18 Client Caching ƒ Increases the performance of Web Services clients by caching responses from remote Web Services Once a response is cached, subsequent calls to the same web service with the same set of request parameters could be responded from cache ƒ Provided as a JAX-RPC handler Based on the policy specified in the cachespec.xml file ƒ Choice of methods to invalidate cached values Rule Based, Time Based, APIs

BM Software Group WebSphere software Section Web Services Interoperability( ws-y) IBM Software Group I Web Sphere software Web Services: Interoperability(WS-I) Organization focused on promoting interoperability between Web servi Provide guidance in the standardization of Web Services between different platforms, applications and programming languages Defines profiles, which are a set of different specifications b WS-I Basic Profile 1.0 required by J2EE 1.4 WS-I Basic Profile 1. 1 currently supported

10 IBM Software Group | WebSphere software WebSphere Application Server v6 19 Web Services Interoperability (WS-I) Section IBM Software Group | WebSphere software WebSphere Application Server v6 20 Web Services: Interoperability (WS-I) ƒ Organization focused on promoting interoperability between Web Services ƒ Provide guidance in the standardization of Web Services between different platforms, applications, and programming languages ƒ Defines profiles, which are a set of different specifications WS-I Basic Profile 1.0 required by J2EE 1.4 WS-I Basic Profile 1.1 currently supported

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共21页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有