package fr.iutnice.lpmi.ws.td2; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; public class UpperCaseClient { /** * @param args First arg is name os the server, second arg is arg passed to webservice */ public static void main(String [] args) { try { String endpoint = "http://"+args[0]+":8080/axis/services/ws-td1"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName(new QName("http://lpmi.iutnice.fr/ws/td1", "uppercase") ); // Call to addParameter/setReturnType as described in user-guide.html call.addParameter("in0", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); String ret = (String) call.invoke( new Object[] { args[1] } ); System.out.println("Sent '"+args[1]+"', got '" + ret + "'"); } catch (Exception e) { System.err.println(e.toString()); } } }