C # Remote Call technical WebService practice manual,

Source: Internet
Author: User
Tags soapui

C # Remote Call technical WebService practice manual,
I. course Introduction

A great lecturer once said: the existence of things is reasonable! That is to say, there is a reason for the existence of all things, and all things can find the reason for their existence. We should focus on the nature of causal association. Therefore, before this course class, we need "three chapters of the law" not to talk about the following "serious" and "sensitive" topics: WebService is out of date and how to use it! Why use WebService instead of the popular RestFul ASP. NET WebAPI? The answer to the above question is simple: it is a different fireworks WebService!

In this sharing lesson, you will learn the following knowledge points:

1) Schematic diagram of WebService technical calling.

2) C # common WebService call methods.

3) C # WebService debugging tips and necessary tools for development.

4) Practical drills on how to use WebService in an elegant way. It is not elegant. You can see it after reading it. We try to Write Less Do More!(Strongly recommended)

Insert a hard advertisement here: the next session to share the course will bring you the "C # Remote Call technology WebService sunflower Collection", the focus of the course will be to share with you the "C # WebService two different reference methods ", "How to use Asynchronous WebService call" and "about how C # WebService allows clients to call several common solutions in a secure manner. I try my best to share some dry goods with you!

If you want to shareInterestedIf so, please study with Jack. We don't need to talk much about it. We just need to get the dry goods directly. We don't make the dry goods, but we are just the porters of the dry goods.


Hi everyone, my name is WebService! Ii. Concepts

2.1 What is remote call technology (RPC )?

One system remotely calls the services of another system to obtain the business data of the remote system.

2.2. Why RPC technology?

Based on security considerations, enterprises generally do not open their own databases and can only use Remote Call technology.

2.3. What is SOAP?

SOAP: (Simple Object Access Protocol) Simple Object Access Protocol. SOAP is a solution for RPC at the earliest. SOAP is a standard for calling methods in XML format.

2.4. What is WebService?

WebService is a remote call technology that uses the SOAP protocol for HTTP transmission.

2.5 What communication protocols does WebService use?

The basic communication protocol used by WebService is SOAP, which exchanges information in a distributed or distributed environment. It is based on XML protocol, through the SOAP protocol, applications can be called in different projects, different locations, or even remotely.

2.6. Why does WebService work across platforms?

In fact, the main goal of WebService is cross-platform interoperability. To achieve this goal, WebService is fully based on XML (Extensible Markup Language), XSD (XMLSchema), and other standards independent of the platform and software vendors, is a new platform for creating interoperable and distributed applications.

2.7 what are the three elements of WebService implementation?

The role of WSDL: the instructions for use on the webservice server. (Web Service Description Language)

SOAP: standardizes XML tags.

UDDI: Provides the search and registration functions for the webservice server.

2.8 what are the advantages of WebService?

1). operable distributed applications.

Communication can be implemented between different applications and applications developed on different system platforms.

2). It is universal and uses HTTP and XML for communication.

Any device that supports HTTP and XML technology can own and access the Web Service. Different Development languages on different platforms can still call our released Web Service.

3) Web services can even communicate freely through the firewall.

Generally, the Web server to be accessed and the client of the Web Service to be accessed are located behind the firewall. By default, all the other ports are closed and the HTTP port is developed. The Web service is based on HTTP, so it can pass through the firewall.

4) interoperability between heterogeneous platforms.

The biggest advantage of Web Service is that it provides technical means of seamless Street connection on heterogeneous platforms. Different users use different hardware platforms, operating platforms, operating systems, software, and Protocols to communicate with each other. Web Service enables any two applications to communicate with each other as long as they can read and write XML. Implement remote calls using the SOAP protocol.

Summary:

In a plain language, a dumb can use the standard WebService technology in C #, JAVA, PHP, and other languages to implement communication between applications in different languages, that is, mutual calls.

Iii. Schematic diagram of WebService technical call
Figure 1

 

 


Working principle of WebService 2

3.1. How does Webservice implement remote calls? What is the role of the three elements in webservice?

(1) Principles of Webservice: webservice is a remote data calling technology that uses the SOAP protocol transmitted over http.

(2) Role of WSDL: Instructions for use on the webservice server. (Web Service Description Language)

(3) SOAP: standardizes XML tags.

(4) UDDI: Provides the webservice server's search and registration functions.

3.2. Key principles of WebService:

Service provider: The publisher needs to deploy the Webservice application.

Caller: the client needs to refer to the Web Service server's user manual (WSDL) for calling.

Iv. Several call methods commonly used by C # WebService

4.1. C # dynamically call WebService through Dynamic.

In fact, the procedure is the same as the procedure for manually creating and adding a reference. Here, the manual method is changed to automatic mode. The proxy class is dynamically generated and the method is dynamically called Using Reflection. For more information, see [c#dynamdynamdynamdynamdynamdynamwebservice.pdf.

4.2. C # simulate the HTTP request protocol Get and POST to call WebService. (Used based on personal projects)

For details, refer to: Using [c#to simulate httprequest agreement to call webservice.pdf.

4.3 manually generate the client's WSDL proxy class for calling. (Used based on personal projects)

The local software provides our local wsdl.exe tool to generate a local wsdl proxy class.

4. You can use the SOAP protocol for manual reference. (Strongly recommended by Microsoft)

V. C # WebService debugging tips and necessary tools for development

5.1. C # How to debug the WebService and remote Web service.

For details, refer to [C # webservicesuch as .pdf]

5.2 Webservice debugging tool

1... NET WebService Studio provided by Microsoft

: Http://webservicestudio.codeplex.com/

2. Storm (recommended)

: Http://storm.codeplex.com/, by the way, the tool also has a "fellow brother" called WCF Storm.

3. soapui (highly recommended)

: Https://www.soapui.org/downloads/latest-release.html

Vi. Practical drills: How to Use WebService in an elegant way

Uniform portal to obtain the specified T-type WebService instance


  Client callers will use a unified portal for access

Related Article

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.