WebService service and client call simple instance

1. Server side

package io.renren.modules.webservice.service;import javax.jws.WebService;import javax.xml.ws.Endpoint;/**  * Created by Icebery on 2017/10/11 .  */ @WebService public class Function {//This method is to be exposed to other applications to call public String transWords(String words){ String res=""; res=words.toUpperCase();// for(char ch: words .toCharArray()){// res+="	"+ch+"	";// } return res; } //Here we use the main method to publish our service< span style="color:#808080"> public static void main(String [] args){ Endpoint.publish("http://localhost:9001/Service/Function"< /span>,new Function()); System.out.println ("Publish Success~"); < /span>})

Second, client call

package io.renren .modules.webservice.service;/**  * Created by Icebery on 2017/10/11.  */ public class TestWs {public static void main(String[] args){ Function fu; fu=new Function(); String str =fu.transWords("I Love Lee!"); System.out.println(str); }}

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3508 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.