资源简介
下载axis2-1.7.4-bin.zip,lib目录下的jar包是WebService业务开发需要的库文件
代码片段和文件信息
/*
* 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 samples.databinding;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMDocument;
import org.apache.axiom.om.OMElement;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.UnmarshalHandler;
import org.exolab.castor.xml.Unmarshaller;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import samples.databinding.data.GetStockQuote;
import samples.databinding.data.GetStockQuoteResponse;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
public final class StockClient {
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.err.println(“Usage: StockClient “);
return;
}
final String url = args[0];
final String symbol = args[1];
System.out.println();
System.out.println(“Getting Stock Quote for “ + symbol);
StockQuoteServiceStub stub =
new StockQuoteServiceStub(url);
stub._getServiceClient().getOptions().setAction(“getStockQuote“);
GetStockQuote stockQuote = new GetStockQuote();
stockQuote.setSymbol(symbol);
OMDocument document = OMAbstractFactory.getOMFactory().createOMDocument();
Marshaller.marshal(stockQuote document.getSAXResult().getHandler());
OMElement response = stub.getStockQuote(
document.getOMDocumentElement());
Unmarshaller unmarshaller = new Unmarshaller(GetStockQuoteResponse.class);
UnmarshalHandler unmarshalHandler = unmarshaller.createHandler();
GetStockQuoteResponse stockQuoteResponse;
try {
ContentHandler contentHandler = Unmarshaller.getContentHandler(unmarshalHandler);
TransformerFactory.newInstance().newTransformer().transform(response.getSAXSource(false) new SAXResult(contentHandler));
stockQuoteResponse = (GetStockQuoteResponse) unmarshalHandler.getobject();
} catch (SAXException e) {
throw new RuntimeException(e);
} catch (TransformerException e) {
throw new RuntimeExce
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 0 2018-03-14 10:58 新建文本文档.txt
目录 0 2017-11-21 00:20 axis2-1.7.7\
目录 0 2017-11-21 00:18 axis2-1.7.7\repository\services\
文件 11378 2017-11-21 00:18 axis2-1.7.7\repository\modules\axis2-jaxws-mar-1.7.7.mar
文件 15187 2017-11-21 00:18 axis2-1.7.7\repository\modules\mtompolicy-1.7.7.mar
文件 18 2017-11-21 00:18 axis2-1.7.7\repository\services\services.list
目录 0 2017-11-21 00:20 axis2-1.7.7\bin\
文件 2822 2017-11-20 23:35 axis2-1.7.7\bin\wsdl2java.bat
文件 3480 2017-11-20 23:35 axis2-1.7.7\bin\setenv.sh
文件 666 2017-11-20 23:35 axis2-1.7.7\conf\axis2.policy
文件 16834 2017-11-20 23:34 axis2-1.7.7\lib\activation-LICENSE.txt
文件 11358 2017-11-20 23:34 axis2-1.7.7\lib\axis2-LICENSE.txt
文件 11560 2017-11-20 23:34 axis2-1.7.7\lib\commons-fileupload-LICENSE.txt
文件 11358 2017-11-20 23:34 axis2-1.7.7\lib\geronimo-annotation-LICENSE.txt
文件 11359 2017-11-20 23:34 axis2-1.7.7\lib\geronimo-stax-api-LICENSE.txt
文件 11560 2017-11-20 23:34 axis2-1.7.7\lib\httpcore-LICENSE.txt
文件 1612 2017-11-20 23:34 axis2-1.7.7\lib\jaxen-LICENSE.txt
文件 1489 2017-11-20 23:34 axis2-1.7.7\lib\jibx-run-LICENSE.txt
文件 16834 2017-11-20 23:34 axis2-1.7.7\lib\mail-LICENSE.txt
文件 11358 2017-11-20 23:34 axis2-1.7.7\lib\woden-core-LICENSE.txt
文件 11358 2017-11-20 23:34 axis2-1.7.7\lib\xm
文件 1982 2017-11-20 23:34 axis2-1.7.7\README-std-bin.txt
文件 11359 2017-11-20 23:34 axis2-1.7.7\LICENSE.txt
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\databinding\client\src\
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\databinding\service\
目录 0 2017-11-21 00:20 axis2-1.7.7\samples\faulthandling\
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\faulthandling\docs\
目录 0 2017-11-21 00:20 axis2-1.7.7\samples\java_first_jaxws\
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\java_first_jaxws\src\main\demo\hw\
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\java_first_jaxws\src\webapp\WEB-INF\classes\
目录 0 2017-11-20 23:35 axis2-1.7.7\samples\jaxws-addressbook\src\org\apache\
............此处省略793个文件信息
- 上一篇:安卓屏幕录像,可录制内部声音
- 下一篇:亮剑Java项目开发案例导航 源代码
相关资源
- Activiti6.0依赖jar包依赖解决
- axis2所用jar包大全
- XFire1.2.6完整版JAR包
- Spring、MyBatis和SpringMVC整合的jar包
- hadoop-eclipse-plugin-3.1.2.jar
- Hadoop的jar包
- JDBC资料及jar包
- AndroidStudio集成Zxing实现扫一扫demo
- VTK8.0.1+Java环境编译文件Jar包和DLL文件
- java的jar包,几乎很全
- spring5.0全套jar包
- word转pdf用到的jar包
- java 开发 kettle时所需要的jar真实 全面
- activity6.0 jar包
- RecyclerView 各版本的jar包
- jfinal的jar包
- javafx的jar包232241
- hive-exec-*.jar包
-
poi的所有jar包,poi, poi-ooxm
l,poi - Java音乐播放器源码+jar包+数据库
- SSH三大整合完整jar包,包括Hibernate4,
- Spring框架的所有jar包
- hive仓库jar包
- ecside最新版jar包
- charles-proxy-4.2.1-win64含破解jar包和破解
- wlfullclient.jar(weblogic完整jar包)
-
android fr
amework(5.0和6.0)编译出来的 - SSHspringmvc+spring4.1+hibernate4.0jar包整合
-
spring-fr
amework-4.2.4 所有jar包和xsd文件 - Appium java jar包
评论
共有 条评论