Develop SMS applications using Delphi and Web Services Technology
Abstract: This article develops a Web Services technology-based application in Delphi by using the instance of using Delphi and Web Services technology to develop SMS applications. Keywords: Delphi; Web Service; SMS application development, a Web Services-based application development Just support Web Services development and application, this article uses Delphi 7.0 call Sina's Web Service to develop SMS applications to develop this example details how to develop Web Services-based applications in Delphi. The first step is to prepare, learn about Sina SMS Web Service. Sina Send SMS's Web Service address is http://smsinter.sina.com.cn/ws/smswebservice0101.wsdl, the Web Service only has a method, the String Sendxml (Carrier, UserId, Password, MobileNumber, Content, MsgType) . All parameters are all String types, and their meaning is basically as follows (may not be correct). Carrier: The operator name, it seems to be casually lost, it is recommended to enter "sina", if you enter other values, the message is particularly slow; userid: Mobile phone ID registered on Sina Wireless, if you are not in http: // SMS .Sina.com Register your phone on. You can't use this web service to send text messages; password: You are using the password used when registering your phone on Sina; MobileNumber: The mobile phone number of the other party; Content: Send a short message Content; MsgType: Send a short message type, I estimate to support MMS, but I don't know how to use it, it seems that I can lose anything, I use "text". Please refer to the relevant instructions on Sina Wireless website, but it is also a two-corner, which is not very clear. Since the backstage may use a message queue mechanism, there may be a long period of delay when busy. Step 2, build a blank application first. Run Delphi 7, open the [File] -> [New] -> [Application] menu, Delphi automatically generates a default project. Change the default form FORM1 to SMS and save the work as SMSDemo.prj. As shown in the figure below: Figure 1 The third step is introduced into the Web Service. Open the [File] -> [New] -> [Other] menu, select the WebServices TAB page in the pop-up window, then select in which the WSDL Importer option is selected, click the OK button to pop up the WSDL Importer Wizard window, as shown in Figure 2 . Enter: http://smsinter.sina.com.cn/ws/smsWebService0101.wsdl (note, you can't lose wrong!), Click Next button, click Finishi button, complete the introduction of the Wave Send SMS Web Service.