A simple WebService service

Source: Internet
Author: User

now, Online offers the Free WebService Service website: http: // www.webxml.com.cn/


From the extension, it is a Web site built by. Net. Look at the implementation of the function:

Requirements: We want to remotely invoke the phone number to the place of the query:



Development steps:1. Establishment of the project: Ws01_firstws2. Read the WSDL address with the tool that comes with the JDK


New



Result output:

These are called stub-piles based on remote services, and the resulting piles are copied to the project's directory: The next step: to write a client call. Public classfirstclient { Public Static voidMain (string[] args) {//1. Locate the service class in the pile and instantiate itMobilecodews MCS =Newmobilecodews (); //2 Getting an instance of an interface through a serviceMobilecodewssoap MC =Mcs.getmobilecodewssoap (); //3. Get the data through the interface call methodString str =mc.getmobilecodeinfo ("18618372386", "" "); //4 Printing:System.out.println (str); }} Results printed:



Description: We used the Java client to invoke the remote. NET WebService service.

A simple WebService service

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.