2009-06-17 3 views
0

안녕하세요, 저는 webapp에 축이있어 정확하게 http://localhost:8080/oop/services/test2?wsdl에 액세스 할 수 있습니다. 나는 클라이언트를 썼다 :축 - 액세스 방법은 무엇입니까?


    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 

무엇이 잘못 되었습니까? 감사합니다

답변

0
+0

내가, 내가 올바른 URL은 http 미안 혼합 해요 : // localhost를 : 8080/OOP/서블릿/AxisServlet/서비스/TEST2하고 –

+0

시도를 작동하지 않습니다 서비스를 REST (예 : http : // localhost : 8080/oop/servlet/AxisServlet/services/test2? param = Hello 404.jsp는 무엇을 말하고 있는가? 작업 이름이 잘못되었을 수도 있습니다. wsdl은 무엇입니까? – akarnokd

+0

http : // localhost : 8080/oop/servlet/AxisServlet/services/test2? param = Hello는 다음을 반환합니다. test2 안녕하세요, AXIS 서비스입니다! 아마도 여기에 서비스를 호출 할 수있는 양식이있을 것입니다 ... wsdl 어떻게 든 보내야합니다. 올바르게 형식화되지 않았습니다. –