用java 调用吗 还是????用java的话

解决方案 »

  1.   

    String endpoint = "https://ip:" +端口+ "/axis/services/服务名称";
             Service  service = new Service();
              Call     call    = (Call) service.createCall();
            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
            call.setOperationName("toString");
            String res = (String) call.invoke( new Object[] {} );
            System.out.println( res);
      

  2.   

    上面给的代码是使用的axis,
    其实webservice有很多工具可供选择,http://www.jopener.cn/category/web-services-tools/
      

  3.   

    你好我想请问一下这句话是什么意识,
    String res = (String) call.invoke( new Object[] {} );
    服务端提供了一个方法让我调用,上面的这句话就可以调用吗?能不能帮我 讲一下,谢谢!谢谢!
      

  4.   

    大哥call.setOperationName("toString");是设置方法名吗?
      

  5.   

    大哥客户端开发需不需要根据wsdl生 成java文件。
      

  6.   

    LZ首先呢,对于你这个问题,我只能说:有些帽子太大了,范围太大了。你作为客户端,但是这个客户端是什么呢,laszlo?flex?java?还是别的什么呢?,但是话又说回来,不管是什么的客户端,不外乎你要知道wsdl定义的服务,并且知道wsdl的类型(所谓的文字/文档、RPC/文档、文字/编码、RPC/编码),这些个都是基础性概念。
      

  7.   

    String endpoint = "https://ip:" +端口+ "/axis/services/服务名称";
             Service  service = new Service();
              Call     call    = (Call) service.createCall();
            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
            call.setOperationName("toString");
            String res = (String) call.invoke( new Object[] {} );
            System.out.println( res);大哥我要传参数怎么传,
    这样可不可以String res = (String) call.invoke( new Object[] {“aaa”,“bbb”} );
    需不需要专们的参数类型。
      

  8.   

    public   class   AXISTest   {   
                
              public   static   void   main(String[]   args)   throws   Exception   {   
                        
                      Service   service   =   new   Service();   
                      Call   call   =   (Call)   service.createCall();   
                      //////////访问即时发布的Distance服务   
                      //设置访问点   
                      call.setTargetEndpointAddress("http://150.236.80.78:7001/EUPortal/webservice/tcqi.jws");   
                      //设置操作名   
                      call.setOperationName("getDeviceInformation");   
                      //设置入口参数   
                      call.addParameter("deviceName",   XMLType.XSD_STRING,   ParameterMode.IN);   
                      call.setReturnType(XMLType.XSD_ANYTYPE);   
                      String   d1   =   "NokiaS60";   
                        
                      GetDeviceInformationOutput   resp   =   (GetDeviceInformationOutput)   call.invoke(new   Object[]   {   d1   });   
                      
              }     
      }