1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
package equation;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class Client {
public static void main(String [] args)
{
equation.ws.Coefficient mesCoefs=new equation.ws.Coefficient();
try {
//Options options = new Options(args);
String endpointURL = "http://localhost:8080/axis/services/equation";
//options.getURL();
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
call.setOperationName( new QName("equation", "saisirEquation") );
mesCoefs.setA(1.0);
mesCoefs.setB(1.0);
mesCoefs.setC(1.0);
//String res = (String)
call.invoke( new Object[] {mesCoefs} );
//System.out.println( res );
} catch (Exception e) {
System.err.println(e.toString());
}
}
} |
Partager