XML Web Services enables data exchange between heterogeneous systems in the form of XML messages. Although remote access to data and applicationsProgramLogic is not a new concept, but it is a new concept to perform this operation in loosely coupled mode. Previous attempts (such as DCOM, IIOP, and Java/RMI) require close integration between the client and the server, and use the platform and implement specific binary data formats. Although these protocols require specific component technologies or object call conventions, XML Web Services are not required. The only Assumption between the client and the server is that the receiver can understand the received message. In other words, the client and server agree to an agreement (in this case, using WSDL and XSD), and then by using the specified Transport Protocol (such as HTTP) generates messages that comply with the Protocol for communication. Therefore, XML Web Services can be accessed for programs written, used, and run on any operating system in any language. In addition, the flexibility of text formats (such as XML) makes it possible for message exchange to evolve in a loosely coupled manner over time. In environments where it is impossible to update all vertices in message exchange at the same time, such loose coupling is mandatory.
By using the ASP. NET page framework to create XML Web Services, these XML Web Services can access many features of. NET Framework, such as identity authentication, cache, and status management. Because ASP. NET and. NET Framework are hostedCodeTherefore, developers can focus on creating or accessing XML Web Services without writing the infrastructure code.
In the ASP. NET application model, the. aspx extension is planned to be used for browser web pages. To distinguish XML Web Services from General ASP. NET pages, XML Web Services uses the. asmx extension.
XML Web Services consists of two parts: the XML Web Services entry point and the code that implements the XML Web Services function. In ASP. NET, The. asmx file is a text file used as an addressable entry point for XML Web Services. It references the code in the pre-compiled assembly, the code hidden file, or the Code contained in the. asmx file itself.
| Note: |
If the code is directly included in the. asmx file, ASP. NET will compile it on the server as needed. |
At the top of the. asmx fileWebServiceThe Processing Command determines where to find the implementation of XML Web Services. By default, when you use an ASP. NET Web Service Project template to create XML Web Services, Visual Studio uses code to hide files, such as service1.asmx. VB or service1.asmx. CS.
| Note: |
Visual Studio does not support cross-language compilation. For example, you cannot include Visual C # XML Web Services in Visual Basic ASP. NET web application projects, and vice versa. |
When you generate XML Web Services in managed code, ASP. NET automatically provides the infrastructure and processes XML Web Services requests and responses, including analyzing and creating soap messages.
WebService Processing Command
At the top of the. asmx page isWebServiceProcessing Command, which includes information about XML Web Services Implementation in the form of properties. This processing instruction provides necessary information to the ASP. NET environment, for example, which class implements the XML Web Services function.