Web Service Depth Profiling

Source: Internet
Author: User

Web Service

1. Definition:

Web Service is a platform-independent, low-coupling, self-contained, programmable Web-based application that uses Open XML (a subset of standard common markup languages) to describe, publish, discover, orchestrate, and configure these applications for the development of distributed, interoperable applications.

2.WEB Service technology enables different applications running on different machines to Exchange data or integrate with each other without the use of additional, specialized third-party software or hardware.

Soap: Simple Object access Protocol protocol. is the communication protocol for XML WEB Service. When a user finds your WSDL description document through UDDI, he can invoke one or more of the actions in the Web service that you set up by soap. SOAP is a specification for calling methods in the form of XML documents that can support different underlying interfaces, such as HTTP (S) or SMTP.

wsdl: (Web Services Description Language) A WSDL file is an XML document that describes a set of SOAP messages and how to exchange them. In most cases, it is automatically generated and used by the software.

UDDI (Universal Description, Discovery, and integration) is a new project that focuses on Web service providers and users. Before a user can invoke a Web service, it is important to determine which business methods are included in the service, to find the called interface definition, and to prepare the software on the server side, and UDDI is a mechanism to guide the system through the description document to find the appropriate service. UDDI uses the SOAP message mechanism (standard xml/http) to publish, edit, browse, and find registration information. It uses XML format to encapsulate various types of data and send it to the registry or to the registry to return the required data.


There are 3 ways to call WebService

1). HttpGet
2). HttpPost
3). HttpSoap

The advantage of soap is that it can pass structured data, while the first two do not.

Mode one (called directly on the Web page):

www.webxml.com.cn

Mode two (via MyEclipse connection webserver):

Way three (, to live locally these types of files are copied to the project you need to use, you can invoke the method provided by WebService as you would call a local class):

Error may occur: (Package name and existence path consistent, my resolved)

Workaround (, the following package name should be wrong to write cn.com.webxml)

1.

2.

3.

4.

5.

6.

7.

Test:

 Packagecn.test;ImportCn.com.webxml.MobileCodeWS;ImportCn.com.webxml.MobileCodeWSSoap; Public classWebServiceTest { Public Static voidMain (string[] args) {mobilecodews ws=Newmobilecodews (); Mobilecodewssoap Soap=Ws.getmobilecodewssoap (); String Info= Soap.getmobilecodeinfo ("1501074", "");//parameter one: mobile number parameter two: Business number is not emptySystem.out.println (info); }}

Web Service Depth Profiling

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.