How i can convert client for Axis 1.4 to Axis2 in JAVA ?
Posted
by dahevos
on Stack Overflow
See other posts from Stack Overflow
or by dahevos
Published on 2010-04-16T13:10:30Z
Indexed on
2010/04/16
13:13 UTC
Read the original article
Hit count: 231
Hello,
First of all i success to programming a client for an Axis 1.2 web service, but for Axis2 i don't know how i can do, and the tutorial in Apache don't really help me.
Here my code :
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class EmployeClient {
public static void main(String [] args) throws Exception {
Service service = new Service();
Call call = (Call)service.createCall();
String endpoint = "http://localhost:8080/axis/services/EmployeService";
call.setTargetEndpointAddress(new URL(endpoint));
call.setOperationName(new QName("getCurrentID"));
String dept = "marketing";
String name = "sacha";
String position = (String)call.invoke(new Object [] {new String(dept), new String(name)});
System.out.println("Résultat de la recherche : " + position );
}
}
So how can i do for convert this code in Axis2 ? Thanks you very much.
ps : i'm french, sorry for my bad english !
© Stack Overflow or respective owner