In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "the method of integrating Axis1.4 in java project". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Server (project name: server)
1.1.Building Axis1.4 environment
1) download axis1.4 file [Click to download], copy all jar packages of axis-1_4\ lib to server\ WebRoot\ WEB-INF\ lib
2) add the following contents to the server-config.wsdd file under server\ WebRoot\ WEB-INF
3) server\ WebRoot\ WEB-INF\ web.xml add content:
Index.jsp AxisServlet org.apache.axis.transport.http.AxisServlet AxisServlet / services/* index.html index.htm index.jsp default.html default.htm default.jsp
1.2.Writing webservice classes and methods
Package com.sdxjd.webservice;public class Server {public String getName (String name) {return "Hello," + name;}}
1.3.deploy Tomcat, open the browser access address:
Http://localhost:8080/server/services
two。 Client (project name: client)
2.1. Use the wsimport command that comes with jdk to generate the client as follows:
Wsimport-keep-pcom.sdjxd.base http://localhost:8080/server/services/Server.jws?wsdl
Copy the generated java file to the client client\ src path
2.2. Write client classes and methods
Package com.sdjxd.client;import com.sdjxd.base.Server;import com.sdjxd.base.ServerService;public class Client {public static void main (String args []) {Server server = new ServerService () .getServer (); String res = server.getName ("webservice"); System.out.println (res) This is the end of the introduction of "the method of integrating Axis1.4 in java Project". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.