Web service

Webservice architecture for android

including  client and service

1.   Why we use webservice and what should I acknowledge?

Web services overview

A Web service is a set of relatedapplication functions that can be programmatically invoked over the Internet.Businesses can dynamically mix and match Web services to perform complextransactions with minimal programming. Web services allow buyers and sellersall over the world to discover each other, connect dynamically, and executetransactions in real time with minimal human interaction.

Web services are self-contained,self-describing modular applications that can be published, located, andinvoked across the Web.

Web services areself-contained. On the client side, no additional software is required. A programminglanguage with XML and HTTP client support is enough to get you started. On theserver side, a Web server and servlet engine are required. The client andserver can be implemented in different environments. It is possible to Webservice enable an existing application without writing a single line of code.

Web services areself-describing. The client and server need to recognize only the format and content ofrequest and response messages. The definition of the message format travelswith the message; no external metadata repositories or code generation toolsare required.

Web services aremodular. Simple Webservices can be aggregated to form more complex Web services either by usingworkflow techniques or by calling lower layer Web services from a Web serviceimplementation.

Web Services areplatform independent. Web services are based on a concise set of open,XML-based standards designed to promote interoperability between a Web serviceand clients across a variety of computing platforms and programming languages.

Web services might be anything, forexample, theatre review articles, weather reports, credit checks, stockquotations, travel advisories, or airline travel reservation processes. Each ofthese self-contained business services is an application that can easilyintegrate with other services, from the same or different companies, to createa complete business process. This interoperability allows businesses todynamically publish, discover, and bind a range of Web services through theInternet.

Categories of Web services

Web services can be grouped into threecategories:

Businessinformation. A business shares information with consumers or other businesses. In thiscase, the business is using Web services to expand its scope. Examples ofbusiness informational Web services are news streams, weather reports, or stockquotations.

Businessintegration. A business provides transactional, "for fee" services to itscustomers. In this case, the business becomes part of a global network ofvalue-added suppliers that can be used to conduct commerce. Examples ofbusiness integration Web services include bid and auction e-marketplaces,reservation systems, and credit checking.

Business processexternalization. A business differentiates itself from its competition through thecreation of a global value chain. In this case, the business uses Web servicesto dynamically integrate its processes. An example of business processexternalization Web services is the associations between different companies tocombine manufacturing, assembly, wholesale distribution, and retail sales of aparticular product.

Service roles and interactions

A network component in a Web Servicesarchitecture can play one or more fundamental roles: service provider, servicebroker, and service client.

  • Service providers create and deploy their Web services and can publish the availability of their WSDL-described services through a service registry, such as a UDDI Business Registry.
  • Service brokers register and categorize published services and provide search services. For example, UDDI acts as a service broker for WSDL-described Web services.
  • Service clients use broker services such as the UDDI Business Registry to discover a needed WSDL-described service and then bind to and call the service provider.

Binding involves establishing allenvironmental prerequisites that are necessary to successfully complete theservices. Examples of environmental prerequisites include security, transactionmonitoring, and HTTP availability. The relationships between these roles aredescribed in Figure 1.

Figure 1. Service roles and interactions.


  • Web services standards
    One of the key attributes of Internet standards is that they focus on protocols and not on implementations. The Internet is composed of heterogeneous technologies that successfully interoperate through shared protocols. This prevents individual vendors from imposing a standard on the Internet. Open Source software development plays a crucial role in preserving the interoperability of vendor implementations of standards.
  • Creating top-down Web services
    Web services can be created using two methods: top-down development and bottom-up development. Top-down Web services development involves creating a Web service from a WSDL file.
  • Creating bottom-up Web services
    Web services can be created using two methods: top-down development and bottom-up development. Bottom-up Web services development involves creating a Web service from a Java bean or enterprise bean.

Tools for Web services development

Tools are provided to assist with thefollowing aspects of Web services development:

  • Discover. Browse the UDDI Business Registries or WSIL documents to locate existing Web services for integration.
  • Create or Transform. Create bottom-up Web services from existing artifacts, such as Java™ beans and enterprise beans. Create top-down Web services from WSDL discovered from others or created using the WSDL Editor.
  • Build. Wrap existing artifacts as SOAP accessible services and describe them in WSDL. The Web services wizards assist you in generating a Java client proxy to Web services described in WSDL and in generating Java bean skeletons from WSDL.
  • Deploy. Deploy Web services into a variety of test environments.
  • Test. Test Web services running locally or remotely in order to get instant feedback.
  • Develop. Generate sample applications to assist you in creating your own Web service client application.
  • Publish. Publish Web services to a UDDI v2 or v3 Business Registry, advertising your Web services so that other businesses and clients can access them.

Tools for Web services development

Tools are provided to assist with thefollowing aspects of Web services development:

  • Discover. Browse the UDDI Business Registries or WSIL documents to locate existing Web services for integration.
  • Create or Transform. Create bottom-up Web services from existing artifacts, such as Java™ beans and enterprise beans. Create top-down Web services from WSDL discovered from others or created using the WSDL Editor.
  • Build. Wrap existing artifacts as SOAP accessible services and describe them in WSDL. The Web services wizards assist you in generating a Java client proxy to Web services described in WSDL and in generating Java bean skeletons from WSDL.
  • Deploy. Deploy Web services into a variety of test environments.
  • Test. Test Web services running locally or remotely in order to get instant feedback.
  • Develop. Generate sample applications to assist you in creating your own Web service client application.
  • Publish. Publish Web services to a UDDI v2 or v3 Business Registry, advertising your Web services so that other businesses and clients can access them.


A service provider hosts a Web service andmakes it accessible using protocols such as SOAP/HTTP or SOAP/JMS. The Webservice is described by a WSDL document that is stored on the provider's serveror in a special repository. The WSDL document may be referenced by the UDDIbusiness registry and WSIL documents. These contain pointers to the Webservice's WSDL files.

The WS-I Simple SOAP Binding Profile andWS-I Attachments Profile are outlines of requirements to which WSDL and Webservice protocol (SOAP/HTTP) traffic must comply in order to claim WS-Iconformance. The Web services WS-I validation tools currently support WS-ISimple SOAP Binding Profile 1.0 and the Attachment Profile 1.0. To view thespecifications, refer to the WS-I Web site, and underResources select Documentation: http://www.ws-i.org

Several new Web services standards arealso supported by this development environment. These include:

JAX-RPC

JAX-RPC stands for Java™ API for XML-based RPC, alsoknown as JSR 101. It is a specification that describes Java ApplicationProgramming Interfaces (APIs) and conventions for building Web services and Webservice clients that use remote procedure calls (RPC) and XML. It standardizesthe Java to WSDL and WSDL to Java mappings, and provides the core APIs for developingand deploying Web services and Web service clients on the Java platform. Formore information refer to theofficialspecifications.

JSR-109

JSR-109 (Implementing Enterprise Web Services) definesthe programming model and run-time architecture to deploy and look up Webservices in the Java EE environment; more specifically, in the Web, EJB, andClient Application containers. One of its main goals is to ensure vendors'implementations interoperate. For more information, refer to the officialspecifications:

·        JSR-109

·        JSR-921

WS-S

These tools support the OASIS Web Services Security 1.0standard. For more information on the various components of this standard,refer to:

·        WebServices Security: SOAP Message Security V1.0

·        WebServices Security: Username Token Profile V1.0

·        WebServices Security: X.509 Token Profile V1.0

Web services tooling supports thefollowing specifications:

Technology or specification

Version or level supported

Transports

HTTP/HTTPS

v1.0 and v1.1

JMS

Messaging

SOAP specification

v1.1

SOAP Attachements

Description

UDDI

v2.0

WSDL

v1.1

WSIL

v1.0

Security

WS-Security

OASIS Standard 1.0

Ineroperability

WS-I Basic Profile

1.1.2

WS-I Simple SOAP Binding Profile

1.0.3

WS-I Attachments Profile

1.0

Other Standards

JAX-RPC

v1.0 for J2EE 1.3, v1.1 for J2EE 1.4 and Java EE 1.5

JSR 109

  • Web Services Description Language (WSDL)
    Web Services Description Language (WSDL) is a standard specification for describing networked, XML-based services. It provides a simple way for service providers to describe the basic format of requests to their systems regardless of the underlying run-time implementation.
  • SOAP
    SOAP (formerly known as Simple Object Access Protocol) is a lightweight protocol for the exchange of information in a decentralized, distributed environment. A SOAP message is a transmission of information from a sender to a receiver. SOAP messages can be combined to perform request/response patterns.
  • Universal Description, Discovery, and Integration (UDDI)
  • Web Services Inspection Language (WSIL)
    Web Services Inspection Language (WSIL) is a service discovery mechanism that is an alternative to UDDI as well as complementary to UDDI. When you discover Web services with UDDI, you go to a centralized registry. WSIL is an alternative approach to Web service discovery. WSIL allows you to go directly to the service provider and ask for the services it provides.
  • JAX-RPC
    JAX-RPC stands for Java API for XML-based RPC, also known as JSR 101. It is a specification that describes Java Application Programming Interfaces (APIs) and conventions for building Web services and Web service clients that use remote procedure calls (RPC) and XML. It standardizes the Java to WSDL and WSDL to Java mappings, and provides the core APIs for developing Web services and Web service clients on the Java platform. Often used in a distributed client/server model, an RPC mechanism enables clients to execute procedures on other systems.
  • JSR 109 - Implementing Enterprise Web services
    JSR 109 (Implementing Enterprise Web Services) defines the programming model and run-time architecture to deploy and look up Web services in the Java EE environment; more specifically, in the Web, EJB, and Client Application containers. One of its main goals is to ensure vendors' implementations interoperate.
  • Web services interoperability (WS-I)
    WS-I is an organization designed to promote Web service interoperability across platforms, operating systems, and programming languages.
  • Web Services Description Language (WSDL)
    Web Services Description Language (WSDL) is a standard specification for describing networked, XML-based services. It provides a simple way for service providers to describe the basic format of requests to their systems regardless of the underlying run-time implementation.
  • SOAP
    SOAP (formerly known as Simple Object Access Protocol) is a lightweight protocol for the exchange of information in a decentralized, distributed environment. A SOAP message is a transmission of information from a sender to a receiver. SOAP messages can be combined to perform request/response patterns.
  • Universal Description, Discovery, and Integration (UDDI)
  • Web Services Inspection Language (WSIL)
    Web Services Inspection Language (WSIL) is a service discovery mechanism that is an alternative to UDDI as well as complementary to UDDI. When you discover Web services with UDDI, you go to a centralized registry. WSIL is an alternative approach to Web service discovery. WSIL allows you to go directly to the service provider and ask for the services it provides.
  • JAX-RPC
    JAX-RPC stands for Java API for XML-based RPC, also known as JSR 101. It is a specification that describes Java Application Programming Interfaces (APIs) and conventions for building Web services and Web service clients that use remote procedure calls (RPC) and XML. It standardizes the Java to WSDL and WSDL to Java mappings, and provides the core APIs for developing Web services and Web service clients on the Java platform. Often used in a distributed client/server model, an RPC mechanism enables clients to execute procedures on other systems.
  • JSR 109 - Implementing Enterprise Web services
    JSR 109 (Implementing Enterprise Web Services) defines the programming model and run-time architecture to deploy and look up Web services in the Java EE environment; more specifically, in the Web, EJB, and Client Application containers. One of its main goals is to ensure vendors' implementations interoperate.
  • Web services interoperability (WS-I)
    WS-I is an organization designed to promote Web service interoperability across platforms, operating systems, and programming languages.

2.   Developing Webservices

Use Web services tools to discover,create, and publish Web services that are created from Java™ beans, enterprisebeans, and WSDL files. You can create of Web services using a top-down approach(which starts with a WSDL file) or a bottom-up approach (which starts with aJava bean or EJB).

In this release, the development path thatyou would typically follow to create and publish a Web service is as follows:

1.     Create a Web project.

2.     Create or import an artifact to be turnedinto a Web service.

3.     Create a Web service.

4.     Publish a business entity.

5.     Publish a Web service.

For instructions on performing these tasks,refer to the list of related topics at the end of this topic.

Web tools assist you in developing Webapplications that you can configure as a Web service. Web applications aredeveloped in a Web project, and Server tools allow you to use the server testenvironment to test and deploy your Web services.

 

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值