import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import java.net.MalformedURLException;
import java.rmi.RemoteException;
/**
* 获得腾讯QQ在线状态(doc from http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?op=qqCheckOnline)
* 输入参数:QQ号码 String,默认QQ号码:8698053。
* 返回数据:String,Y = 在线;N = 离线;E = QQ号码错误;A = 商业用户验证失败;V = 免费用户超过数量
*
* @author zuoguodang
*/
public class HelloWorld {
public static void main(String[] args) throws MalformedURLException, RemoteException, ServiceException {
String endpoint = "http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?wsdl";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setSOAPActionURI("http://WebXml.com.cn/qqCheckOnline");
call.setOperationName(new QName("http://WebXml.com.cn/", "qqCheckOnline"));
call.addParameter(new QName("http://WebXml.com.cn/", "qqCode"),
org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.SOAP_STRING);
System.out.println("1024126430:-----------" + call.invoke(new Object[]{"1024126430"}));
}
}
分享到:
相关推荐
JMeter在WebServices性能测试中的应用JMeter在WebServices性能测试中的应用JMeter在WebServices性能测试中的应用JMeter在WebServices性能测试中的应用JMeter在WebServices性能测试中的应用JMeter在WebServices性能...
php通过WSDL的方式实现webservices接口,需要在php.ini设置always_populate_raw_post_data=-1
Chapter 1, Apache Web Services and Axis2 - Gives you an introduction to web services and the web service stack at Apache. Chapter 2, Looking inside Axis2 - Learn about Axis2 architecture and the ...
本项目是在实际开发调用webservices接口时的做的例子。使用Axis技术开发。 其中包含webservices开发,以及webservices调用。 运行项目后输入:http://localhost:8080/webserviceDemo/services/helloService?wsdl ...
webservices经典教程.rar,找了很久才找到的,欢迎参与评论,交流,QQ:381433298
在ASP,NET Web Services中如何来设定使用Session(HttpSessionState),以厦ASP.NET Web Services的客户端该如何才能让此Session正常运作采雏护状态
通过js调用外部webservices,也可将自己写的webservices发布到网站供别人调用。技术问题可加QQ:862331861互相讨论
通用webservices
1. 了解主流Web Service开发环境; 2. 掌握Microsoft.NET开发环境的搭建方法; 3. 掌握J2EE开发环境的搭建方法。
本文实现一个类似QQ的网络聊天软件的功能;服务端采用WebServices提供技术支持,客户端采用Windows窗体,为用户提供网络聊天的简单功能(群功能请详询我的博客)。
maven依赖
适合做web前台聊天工具 界面还行值得参考一下,值得新手参考参考,和qq差不多
Guide to implement the RESTful web service. The detail describe the POST/GET/PUT method on the RESTful service.
该功能是在VS 2010下开发的,通过运用Web Services 和SOA架构技术进行了封装,通过Web服务(例如UserService1)“暴露”出来。
服务端采用WebServices提供技术支持,客户端采用Windows窗体,为用户提供网络聊天的简单功能。 采用C/S结构,服务端采用WebServices作为服务的技术支持,客户端采用Windows Form实现。 开发工具选择Visual Studio ...
非常好的介绍 Restful 的书籍,英文原版
资源为appscan免费破解版,文件中含有下载链接以及密码。
XML+Web+Services高级编程范例 这个都是本人收藏了3年的资源 现放出 都是总结了很多系统 软件项目实施过程中的经验的 慢慢积累的