Command to generate wsdl2java in Apache axis

Pre requisites: set path for java set JAVA_HOME -> java jdk location set AXIS_HOME -> Axis location// command inside axis bin folder then axis home not needed wsdl2java.bat -uri http://www.webservicex.net/stockquote.asmx?WSDL -d adb -o com.citi.crm.service create one java project import the java service stub client files in the project and use import all the jars from axis bin folder to remove compilation issue /** * */ package net.webservicex.www; import java.rmi.RemoteException; import org.apache.axis2.AxisFault; /** * @author Bala * */ public class TestWS { /** * @param args * @throws AxisFault */ public static void main(String[] args) throws AxisFault { // TODO Auto-generated method stub StockQuoteStub stub = new StockQuoteStub(); StockQuoteStub.GetQuote getQuote = new StockQuoteStub.GetQuote() ; getQuote.setSymbol("10"); try { StockQuoteStub.GetQuoteResponse resp = stub.getQuote(getQuote); System.out.println("result :: " + resp.getGetQuoteResult()); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

Comments

Popular posts from this blog

தட்டு வண்டியில் காளிக்கோயில் - சிறுகதை

பிரேமாவின் பெண் குழந்தை

தீபம் பிளக்ஸ்