WSClient客户端调用---codehaus.xfire
来源:互联网 发布:licecap for mac 编辑:程序博客网 时间:2024/06/05 02:21
感觉这个有问题,不知道为什么总是调用不通。大家试试。
package com.sinoservices.edi.ws;import java.net.MalformedURLException;import java.net.URL;import org.codehaus.xfire.XFireFactory;import org.codehaus.xfire.client.Client;import org.codehaus.xfire.client.XFireProxyFactory;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import com.sinoservices.edi.ws.wsdl.client.HelloWorld;/** * * @版权:SINOSERVICES 版权所有 (c) 2013 * @author:Mars * @version Revision 1.0.0 * @email:Mars.Wei@sinoservices.com * @see: * @创建日期:2017年2月24日 * @功能说明: * @begin * @修改记录: * @修改后版本 修改人 修改内容 * @2017年2月24日 Mars 创建 * @end */public class XFireWSClient { public static void main(String[] args) throws Exception {// clientUtil(); clientUtil11(); // test2(); } private static void clientUtil11() throws Exception { Client client = new Client(new URL("http://127.0.0.1:9050/WolfDIPWebService/GatewayIn?wsdl")); Object[] results = client.invoke("receiveFileData", new Object[] {"YWFh","mars"}); System.out.println(results[0]); } private static void clientUtil1() throws Exception { Client client = new Client(new URL("http://localhost:8080/jdkwsdemo/HelloWorld?wsdl")); Object[] results = client.invoke("doSomething", new Object[] {}); System.out.println(results[0]); } private static void clientUtil() throws Exception { Service srvcModel = new ObjectServiceFactory().create(HelloWorld.class); XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance().getXFire()); String helloWorldURL = "http://localhost:8080/jdkwsdemo/HelloWorld"; try { HelloWorld srvc = (HelloWorld) factory.create(srvcModel, helloWorldURL); String result = srvc.doSomething(); System.out.print(result); } catch (MalformedURLException e) { e.printStackTrace(); } } public static void test2() throws Exception { Service serviceModel = new ObjectServiceFactory().create(HelloWorld.class); HelloWorld cmdbService = (HelloWorld)new XFireProxyFactory().create(serviceModel, "http://localhost:8080/jdkwsdemo/HelloWorld"); cmdbService.doSomething(); } }
0 0
- WSClient客户端调用---codehaus.xfire
- WSClient客户端调用---javax
- WSClient客户端调用---apache.cxf
- WSClient客户端调用---apache.axis2
- xfire客户端调用远程服务出现:org.codehaus.xfire.XFireRuntimeException: Could not find operation xxx方法
- xfire 客户端调用
- xfire客户端调用
- xfire-在客户端调用WebServices
- xfire+webservice(客户端调用篇)
- xfire客户端代码调用2
- xfire客户端调用webservice测试
- myeclipse xfire客户端调用接口
- org.codehaus.xfire.aegis.AegisBindingProvider
- codeHaus XFire实现WebService开发
- axis,jax-ws,xfire客户端调用
- xfire 客户端调用webservice注意要点
- xfire 客户端调用webservice注意要点
- axis1.4 xfire java web客户端调用
- 数据库的实现
- java中equals()方法与hashCode()方法的隐式调用时的约定详解
- Java中的原子操作类
- java基础学习集合之list 九-2
- 行为类模式(读书笔记)
- WSClient客户端调用---codehaus.xfire
- C语言中全局变量、局部变量、静态全局变量、静态局部变量的区别
- ORCLE 知识总结
- LeetCode-35. Search Insert Position
- 优化MySchool 数据库设计 第二章 上机
- 死后的灵魂,如何看待生前的人生
- 如何快速转载CSDN中的博客
- js 导出excel,设置下载的标题
- Linux Socket套接字