Develop a program that invokes the WebService interface using MyEclipse

Source: Internet
Author: User
Tags wsdl

Previous article we have learned how to use Java Tools MyEclipse development of a WebService interface, then the interface developed how to call? Then we'll solve the problem.

1: Start by creating a Java project to select--new Webservice Client

2: Select Jax-WS, Next

3: Write the test address of the interface inside the WSDL URL

↓ Next WSDL validation unexpectedly error, how to solve please look down

Change localhost IP address to host

Next, OK passes validation

The client will default to us to select the package to import

5: Client configuration is complete, test the calling interface class, create a main method in client project to test, the code is as follows

public static void Main (string[] args) {
TODO auto-generated Method Stub
Operatorinfoservice os=new Operatorinfoservice ();
Os.getoperatorinfoport (). AddUser (888, "King");


Look at the effect--------------------------------------we found that the record with UserID 888 in the database was added, A call to add a user interface has been completed-------------------------------------------------------

Develop a program that invokes the WebService interface using MyEclipse

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: 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.