Official page: http://ws.apache.org/axis/
AXIS2 Service-Side references:
Jar Package Required:
Axis.jar
Commons-logging-1.0.4.jar
Commons-discovery-0.2.jar
Jaxrpc.jar
Saaj.jar
Wsdl4j-1.5.1.jar
Log4j-1.2.8.jar
The code is as follows:
Package samples.clients;
Import Javax.xml.namespace.QName;
Import Javax.xml.rpc.ParameterMode;
Import Org.apache.axis.client.Call;
Import Org.apache.axis.client.Service;
Import Org.apache.axis.encoding.XMLType;
public class Stockquoteserviceclient {public
static void Main (string[] args) {
try {
String endpointurl = ' HT TP://LOCALHOST:8080/AXIS2WEB/SERVICES/STOCKQUOTESERVICE?WSDL ";
Service service = new service ();
Call call = (call) Service.createcall ();
Call.settargetendpointaddress (New Java.net.URL (Endpointurl));
Call.setoperationname (New QName ("Http://quickstart.samples/xsd", "GetPrice"));
Call.addparameter ("symbol", xmltype.soap_string, parametermode.in);
Call.setreturntype (xmltype.soap_string);
string ret = (string) call.invoke (new object[] {"Shenbin"});
SYSTEM.OUT.PRINTLN (ret);
} catch (Exception e) {
}
}
}