Jdk provides webservice and jdk provides webservice.

Source: Internet
Author: User

Jdk provides webservice and jdk provides webservice.

1. Create the class to be released

Package com. test. webserive; import javax. jws. webService; // targetNamespace defines the namespace @ WebService (targetNamespace = "http://www.mess.com") public class HelloServiceImpl {public String sayHello (String name) {return "Hello:" + name ;} public String syaHi (String username) {return "Hi:" + username ;}}

2. Publish a service

Package com. test. webserive; import javax. xml. ws. endpoint; public class Service {public static void main (String [] args) {/*** parameter 1: Server publishing address * parameter 2: Service implementer */Endpoint. publish ("http: // 10.90.2.17: 6789/hello", new HelloServiceImpl (); System. out. println ("Server ready... ");}}

3. Start running, open the browser and enter

Http: // 10.90.2.17: 6789/hello? Wsdl
The following file is published successfully:

 

 

 

Which file of the jdk web container is stored on the machine?

JDK does not have its own

Tomcat can be used
 
Jdk16 webservice cannot be integrated with SSH

Answer: It is a waste to be alone. In our past, we were born to regard us as a torch, not to illuminate ourselves, but to embrace the world. Because our virtues cannot be pushed to others, it is like nothing.

Related Article

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.