Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java axis-如何访问它?_Java_Axis - Fatal编程技术网

Java axis-如何访问它?

Java axis-如何访问它?,java,axis,Java,Axis,嗨,我在webapp中有axis,我可以正确访问。我写信给客户: 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 {

嗨,我在webapp中有axis,我可以正确访问。我写信给客户:


  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


怎么了?谢谢

您的EndPout URL错误

-工作
-不

很抱歉,我混淆了正确的url,它不起作用尝试将您的服务作为REST调用,例如,将请求参数放入url 404.jsp说什么?操作名称也可能是错误的。什么是wsdl?返回:test2您好,这是AXIS服务!也许这里会有一个调用服务的表单。。。我需要以某种方式发送wsdl..我无法正确格式化它----