开发工具:
文件大小: 227kb
下载次数: 0
上传时间: 2019-07-29
详细说明:
NULL
博文链接:https://coolbi.iteye.com/blog/777319x七 1 name
public void setNamc(String namc)
this. name
name i
public String getFirststation()
return firststation
public void setFirstStation(String firststation)
this. firststation firststation
public String getLaststation()
return laststation
public void setLaststaticn(String laststation
this. laststation laststaticn
busService pojo
package com. coolbi;
大公交车的服务类
大8 author李朝江
public class BusService
private Bus ous i
public Bus getBus(
return bus
public void set Bus(Bus bus)
B. ous- ous;
以上这些类都是只包含了get和set的POJO
2.、新建立一个 source文件夹 resources,然后建立 MATA-INF文件夹,再建立 services.xml
文件
Her Source Folder
bOltE£Lder
Add a new source folder
Project name:axi=2-01
Br置5e
Folder name: resour ces
Br
I=E
Updat
filt
ther
ol ders to sol
Cancel
播 Package Ey108
Ju JUni
想sr
Fe0 ES
-[MATA-I平F
+E JRE Syst em Library [jrel 6.0]
Scrviccs.xm文件代码如下:
bus services
K messageReceivers>
com. ccolbi. BusService
新建立ant角本
property name="service name value="busService">
opert
name="axis2, home
value="E:/OpenSource/axis2
1.5"× property>
/fileset
/path>
/path>
mkdir dir="sdest. dir. classes)"/
Mkdir dir="sidest. dir. classes)/META-INF"/>
rget>
target name="clean>
/target
file="sbasedirl/resources/META-INF/services. xml
toile="sidest. dir. classes)/META-INF/services. xml"
overwrite="true"/>
basedir)/sr
destdir="sidest. dir. classes" includes="com/coolbi/*x">
还行an:
测试代码
package com. test. coolbii
import javax. xmlname space. QName;
±m。 rt ora, apache.axis2, Axisfault;
import org. apache axis2 addressing. EndpointReference i
import org. apache axis2 client. Options
import org. apache axis2 rpc client. RPCServiceclienti
im。 ct com,coo1bi.Bs
public class BusClient
Param args
大 throws AxisFau1t
public static void main(String[] args) throws AxisFault
RPCServiceclient serverClient new RPCServiceClient()i
Options option = serverClient. getoptions()i
Endpointrererence
endpoint
ne
Endpointreference("http://localhost:8080/axis2/services/ousServic
option. setTc(endpoint)i
QnamEbusnamenewQnamE(http://coolbi.com/xsd","setbus")i
Busbus new Bus (
bus. setfirststaticn("铁心桥");
bus. setlaststation("化神家具港")
bus. setName("171")i
Object[] arg - new Cbject[] bus)i
serverClient. invokeRobust(busName, arg)
QnamEgctbus-newQnamE(http://coolbi.com/xsd","getbus")i
Object[] getBusArgs new Object[]ti
Class[] retTypes new Class[][ Bus classi
○ bject[] response
serverclient. invokeBlocking(getBus I
gctBusArgs, rctTypcs)i
Bus retBus =(Bus)response[0];
1£(ru1!= response)
System,out, print1n("起点站:"+ rebUs, cetfirststation());
System. out. print.1n("终点站:"+reBs, aethaststation());
System.out. print1n("公交车号::"+ rebUs. getName();
运行结果:
Progress E conso
terminated> Busclient [ava Application] C: Program Files\T
log4]: WARN No appenders could he found for log
10g41: NARN PLease initialize the 10g4] aystem
起点站:铁心桥
点站:花神家具港
交车号::171
2
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.