Web Services客户端的一些代码求解

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

首先是一些导入类的作用,看名称大致意思知道,但是怎么样用专业的术语描述不大清楚~因为是要写毕业论文用的,所以需要写的象样点~  
  import   org.apache.axis.client.call;  
  import   org.apache.axis.client.service;  
  import   org.apache.axis.encoding.xmltype;  
  import   org.apache.axis.utils.options;  
  import   javax.xml.rpc.parametermode;  
  import   javax.xml.namespace.qname;  
   
  然后是对服务的访问部分:  
  string   endpoint   =   "http://localhost:8080/axis/services/sqlconnect";  
  string   method   =   "sqlselect";  
  service   service   =   new   service();  
  call   call   =   (call)   service.createcall();  
  call.settargetendpointaddress(new   java.net.url(endpoint));  
  call.setoperationname(method);  
   
  resultset   rs   =   (resultset)   call.invoke("参数1","参数2");  
   
  希望高人帮忙把上面的代码注释下,谢谢了~  
   
  30积分   意思下   了表谢意~~  
 

· 网友精彩回答:

发表者:joybo

"http://localhost:8080/axis/services/sqlconnect"是web   service服务的url  
  在浏览器的地址栏输"http://localhost:8080/axis/services/sqlconnect?wsdl"就可以看到web   service服务的描述文件  
   
  "sqlselect"是这个服务发布的方法名;  
   
  call是用来调用远程方法的类  
   
  设置了call的属性,就可以用invoke()方法执行远程的sqlselect方法

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved