-
大小: 35.09MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-07-11
- 语言: Java
- 标签: apache-cxf
资源简介
调用webservice的,基于cxf的apache-cxfjar文件,适用于服务端开发,客户端代码生成及客户端开发。
代码片段和文件信息
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License Version 2.0 (the
* “License“); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing
* software distributed under the License is distributed on an
* “AS IS“ BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package demo.hw.client;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import demo.hw.server.HelloWorld;
public final class Client {
private Client() {
}
public static void main(String args[]) throws Exception {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
if (args != null && args.length > 0 && !““.equals(args[0])) {
factory.setAddress(args[0]);
} else {
factory.setAddress(“http://localhost:9000/Hello“);
}
factory.getServiceFactory().setDataBinding(new AegisDatabinding());
HelloWorld client = factory.create(HelloWorld.class);
System.out.println(“Invoke sayHi()....“);
System.out.println(client.sayHi(System.getProperty(“user.name“)));
Document doc = client.getADocument();
Element e = (Element) doc.getFirstChild();
System.out.println(e.getTagName());
Text t = (Text) e.getFirstChild();
System.out.println(t);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 18197 2013-01-28 17:06 apache-cxf-2.5.9\LICENSE
文件 2755 2013-01-28 17:06 apache-cxf-2.5.9\NOTICE
文件 3770 2013-01-28 16:29 apache-cxf-2.5.9\README
文件 3679 2013-01-28 16:29 apache-cxf-2.5.9\release_notes.txt
文件 2235 2013-01-28 16:29 apache-cxf-2.5.9\bin\idl2wsdl
文件 1815 2013-01-28 16:29 apache-cxf-2.5.9\bin\idl2wsdl.bat
文件 3135 2013-01-28 16:29 apache-cxf-2.5.9\bin\java2js
文件 1815 2013-01-28 16:29 apache-cxf-2.5.9\bin\java2js.bat
文件 3135 2013-01-28 16:29 apache-cxf-2.5.9\bin\java2ws
文件 1819 2013-01-28 16:29 apache-cxf-2.5.9\bin\java2ws.bat
文件 3010 2013-01-28 16:29 apache-cxf-2.5.9\bin\mc
文件 1789 2013-01-28 16:29 apache-cxf-2.5.9\bin\mc.bat
文件 2432 2013-01-28 16:29 apache-cxf-2.5.9\bin\wadl2java
文件 1836 2013-01-28 16:29 apache-cxf-2.5.9\bin\wadl2java.bat
文件 2237 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2corba
文件 1826 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2corba.bat
文件 2432 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2java
文件 1836 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2java.bat
文件 2253 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2js
文件 1786 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2js.bat
文件 2994 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2service
文件 1987 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2service.bat
文件 2986 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2soap
文件 1823 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2soap.bat
文件 2986 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2xm
文件 1823 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdl2xm
文件 2997 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdlvalidator
文件 1821 2013-01-28 16:29 apache-cxf-2.5.9\bin\wsdlvalidator.bat
文件 2647 2013-01-28 16:29 apache-cxf-2.5.9\bin\xsd2wsdl
文件 1821 2013-01-28 16:29 apache-cxf-2.5.9\bin\xsd2wsdl.bat
............此处省略2249个文件信息
- 上一篇:基于JavaWeb技术的旅游网站的设计与实现
- 下一篇:Android项目实战博学谷
评论
共有 条评论