先用jdk的工具wsimport對wsdl url產生相關檔案, 接著可以呼叫wsdl,call soap wsdl example: C:\Users\vm\Desktop>"C:\Program Files\Java\jdk1.7.0_51\bin\wsimport.exe" -d test -keep http://www.webservicex.net/CurrencyConvertor.asmx?WSDL package clientweb.servlet; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import thsrwebserviceproj.order.Order; import thsrwebserviceproj.order.OrderService; import thsrwebserviceproj.order.OrderServiceService; /** * Servlet implementation class order */ @WebServlet("/order") public class orderServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public orderServlet() { super(); //