404 Not Found - Axis

0 respostas
Tiago_Farias

Olá galera!

Estou com um problema e não sei mais oq fazer:

Estou tentando acessar um webservice por meio do método Call.invoke e obter uma string como retorno(para saber se há uma comunicação efetiva). Mas toda vez dá erro 404 not found. Veja a stack:

AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)Not Found
faultActor:
faultNode:
faultDetail:
{}:return code: 404
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /common/services/EMAC/wsEMAC.php was not found on this server.</p>
<hr>
<address> (Emprel WebServer) (SO) Server at cohab.recife Port 443</address>
</body></html>

{http://xml.apache.org/axis/}HttpErrorCode:404

(404)Not Found
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.provider.habita.webservice.Cliente.autenticaFuncionario(Cliente.java:38)
at com.provider.habita.webservice.Cliente.main(Cliente.java:169)

O código q estou a fazer eh bem simples...

public class Cliente {
	
	static String local = "https://cohab.recife/common/services/EMAC/wsEMAC.php";
	
	
	public static String autenticaFuncionario(String strCPF, String strSenha, String strSistema)throws RemoteException {
		try{
		
                java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
	        System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
	        System.setProperty("javax.net.ssl.keyStoreType","JKS");
	        System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
	        System.setProperty("javax.net.ssl.keyStore","jssecacerts" );
	        System.setProperty("javax.net.ssl.trustStore","jssecacerts" );
	        System.setProperty("javax.net.ssl.trustStorePassword","changeit" );
	        System.setProperty("javax.net.ssl.trustStoreType","JKS");
	        
			Call call = (Call)new Service().createCall();			
			
			call.setTargetEndpointAddress(local);
			
			call.setOperationName(new QName("","autenticaFuncionario"));
			Object[] param = {strCPF,strSenha,strSistema};
			return (String)call.invoke(param);			
		}
		catch(ServiceException e) {
			e.printStackTrace();
			return null;
		}		
	}
	
	
	public static void main(String args[]){	
		
		try{
			 String  str = Cliente.autenticaFuncionario("teste", "teste", "habita");
			 if (!str.equals("")){
				 System.out.println(str);
			 }
		}
		catch (RemoteException e) {
			e.printStackTrace();
		}
	}
	
}

Alguém poderia me dar alguma sugestão?

[]s.

Criado 28 de novembro de 2008
Respostas 0
Participantes 1