Call Microsoft's WebService registration service instead of VS. NET integrated development environment

Source: Internet
Author: User
Microsoft recently accessed http: // 210.77.155.240/regBeta2/regservice. asmx opens a WebService registration service to register your. NET Beta2, has the opportunity to get a single-foot skateboard marked on behalf of Microsoft.
If. NET Beta2 integrated development environment, it is very easy to compile a WebService client program to call this service, but the configuration of machines where I can access the Internet is too low to install. NET, only one. NET Framework SDK Beta2, so I tried to call it using the SDK method. The specific implementation steps are as follows:
Worker implementation. At the command prompt, type:
Wsdl/out: RegWebService. cs http: // 210.77.155.240/regBeta2/regservice. asmx
RegWebService. cs is the file name of the. cs file we want to generate.
2. With the original file, we can generate the proxy component:
Csc/out: RegWebService. dll/t: library/r: System. xml. dll/r: System. Web. Services. dll RegWebService. cs
Generate the RegWebService. dll agent component library.
3. With the component library, we can compile the client program that calls WebService. You can view RegWebService. cs and write the following code based on the class information:
Using System;
Class RegWebServiceTest
{
Static void Main ()
{
RegService mRegService = new RegService ();
RegType mRegType = new RegType ();

MRegType. cdkey = "cdkey ";
MRegType. sName = "Name ";
MRegType. sPhone = "Phone ";
MRegType. sEmail = "mailto: email @ email ";
MRegType. sCompany = "Company ";
MRegType. sAddress = "Address ";
MRegType. sCitizenID = "CitizenID ";

Bool IsRegSuccess = mRegService. Register (mRegType );
Console. WriteLine (IsRegSuccess. ToString ());
}
}
Save this code as CallWebService. cs. Confirm that the entered fields are correct.
4. Now we can generate executable programs:
Csc/r: RegWebService. dll CallWebService. cs
Generate callwebservice.exe.
5.run callwebservice.exe. If True is returned, the registration is successful.

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.