1.
Summary
Role Description: report data across databases, cross-platform, and cross-language call interfaces [call interface]
File: WebService. asmx
2.
Target
Data is often called across data, servers, and platforms during project development.
Production case http://www.gdelive.cn/asmx/UserInfoLogin.asmx
Case: Reporting user information across Databases
3.
Development Step 3.1. Development Interface 3.1.1.
Add a new project named userinfologin. asmx
3.1.2.
Effect
3.1.3. write code in userinfologin. CS
3.1.4.
Publish Interface
3.1.5.
Deployment Interface
Guangdong Information Server Domain Name Pointing
Http://www.gdelive.cn/asmx/UserInfoLogin.asmx
3.2. Call the interface
Objective: to call an interface, obtain the data returned by the interface, and report data to implement related services.
3.2.1.
Add web reference
3.2.2.
Call the methods in the interface
First, add a namespace. Second, instantiate the class name. You can call the method.
3.3 interface document description specification
Parameter description
Name |
Description |
Data Type |
Client name |
It must contain a maximum of 30 characters. |
String |
Unique machine ID |
The machine identity usually uses the machine MAC address hard disk number, etc. |
String |
Unique machine ID type |
1. MAC address 2. Hard Disk serial number 3. Miscellaneous |
String |
Local time |
Local client time |
String |
Local IP Address |
Local IP address of the client |
String |
Operating system version |
Client local time operating system version |
String |
User Type |
For example, 1 is the pass account, 2 is the broadband account, and 3 is the pass account, depending on the actual situation. |
String |
User Name |
Client logon User Account |
String |
Description: interface parameters: each parameter is separated by the character "|", base64 UTF-8 Encoding
Base64 (unique ID of a machine | Local time | Local IP address | operating system version | user type | user name)
Local debugging: during the development process, you need to test the WebService program on the local machine. You can run the WebService program to use, locate the WebService in the local path, and copy it to the WebService project, double-click the added WebService reference, change its URL value to the path copied after running, and then update it. When using WebService, You can dynamically specify the WebService path used. You only need to copy the specified path to the URL attribute of the WebService object instance.