Estou tentando consumir um web service, mas está dando erro. Estou utilizando o axis.
O código do cliente é o seguinte:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TesteWebService
{
public static void main(String[] args)
{
try
{
String urlWS = "http://localhost:8080/axis/Calculator.jws";
Object[] params = {new Integer(1), new Integer(1)};
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(urlWS);
call.setOperationName("somar");
Integer ret = (Integer) call.invoke(params);
System.out.println("Resultado: " + ret);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
O erro está acontecendo a partir do Service service = new Service();
O erro que dá no eclipse é o seguinte:
[color=“red”]This compilation unit inderecltly references the missing type javax.xml.rpc.Service (typically some required class file is referencing a type outside the classpath)[/color]
Agradece a todos que poderem me ajudar