2009-06-17 5 views
0

Salut j'ai axe dans webapp et je peux accéder http://localhost:8080/oop/services/test2?wsdl correctement. J'ai écrit le client:axe - comment y accéder?


    import org.apache.axis.client.Call; 
    import org.apache.axis.client.Service; 
    import javax.xml.namespace.QName; 

    public class TestClient { 
    public static void main(String [] args) { 
     try { 
     String endpoint = 
      "http://localhost:8080/oop/servlet/AxisServlet/services/test2"; 

     Service service = new Service(); 
     Call  call = (Call) service.createCall(); 

     call.setTargetEndpointAddress(new java.net.URL(endpoint)); 
     call.setOperationName(new QName("http://ws.oopf.com/testclient", "fce")); 

     String ret = (String) call.invoke(new Object[] { "Hello!" }); 

     System.out.println("Sent 'Hello!', got '" + ret + "'"); 
     } catch (Exception e) { 
     System.err.println(e.toString()); 
     } 
    } 
    } 


I receive 
AxisFault 
faultCode: {http://xml.apache.org/axis/}HTTP 
faultSubcode: 
faultString: (404)/WEB-INF/tiles/commons/404.jsp 
faultActor: 
faultNode: 
faultDetail: 
    {}:return code: 404 

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

(404)/WEB-INF/tiles/commons/404.jsp 
    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 TestClient.main(TestClient.java:19) 
(404)/WEB-INF/tiles/commons/404.jsp 

Quel est le problème? merci

Répondre

0
+0

Je suis désolé, j'ai mélangé l'URL correcte est http: // localhost: 8080/oop/servlet/AxisServlet/services/test2 et il ne fonctionne pas –

+0

Essayez invocation de votre service en tant que REST, par exemple mettre un paramètre de requête dans l'URL http: // localhost: 8080/oop/servlet/AxisServlet/services/test2? param = Bonjour Que dit le 404.jsp? Le nom de l'opération peut également être erroné. Quel est le wsdl? – akarnokd

+0

http: // localhost: 8080/oop/servlet/AxisServlet/services/test2? Param = Bonjour renvoie: test2 Bonjour, c'est un service AXIS! Peut-être qu'il y aura un formulaire pour invoquer le service ici ... wsdl Je dois envoyer d'une manière ou d'une autre ... Je n'ai pas pu le formater correctement –

Questions connexes