package com.mgj.xfiretext.domain; import java.io.Serializable; /** private Long userId; private String accountId; private String userName; private Date lastLogin; public String getAccountId() { public void setAccountId(String accountId) { public Date getLastLogin() { public void setLastLogin(Date lastLogin) { public Long getUserId() { public void setUserId(Long userId) { public String getUserName() { public void setUserName(String userName) {
import com.mgj.xfiretext.domain.User; package com.mgj.xfiretext.webserver; import java.util.Date; import org.apache.commons.logging.Log; import com.mgj.xfiretext.domain.User; /** |
<?xml version="1.0"?> <project name="xfire" default="genfiles" basedir="."> <property name="lib" value="${basedir}/../WebRoot/WEB-INF/lib" /> <path id="myclasspath"> <fileset dir="${lib}"> <include name="*.jar" /> </fileset> <pathelement location="${genfiles}" /> </path> <!--${basedir}/../src琛ㄧず鏀懼湪src涓嬮潰 --> <!--${basedir}/../../ssh/src琛ㄧず鏀懼湪鍙﹀涓涓伐紼嬶紙ssh錛変笅鐨剆rc涓嬮潰 --> <!--${basedir}琛ㄧず褰撳墠鐩綍--> <!--閫氳繃XFire ant浠誨姟鐢熸垚瀹㈡埛绔唬鐮佺殑瀛樻斁浣嶇疆--> <property name="code_path" value="${basedir}/../src" /> <!--闇瑕佺敓鎴愬鎴風(fēng)浠g爜鐨剋sdl鏂囦歡--> <property name="wsdl_path" value="http://localhost:8090/xfire/services/UserService?wsdl" /> <!--鐢熸垚瀹㈡埛绔唬鐮佺殑鍖呭悕--> <property name="code_package" value="com.mgj.xfiretext.webserver.client" /> <!-- Remove classes directory for clean build --> <target name="clean" description="Prepare for clean build"> <delete dir="${code_path}"/> <mkdir dir="${code_path}"/> </target> <!--<target name="genfiles" depends="clean" description="Generate the files"> --> <target name="genfiles" description="Generate the files"> <taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" classpathref="myclasspath" /> <!--outputDirectory灞炴у畾涔夊垱寤虹殑浠g爜鎵鍦ㄧ殑鏂囦歡澶?br /> wsdl鏄痺eb鏈嶅姟鐨剋sdl鏂囦歡 package浠h〃鍒涘緩鐨勪唬鐮佺殑package --> <wsgen outputDirectory="${code_path}" wsdl="${wsdl_path}" package="${code_package}" binding="xmlbeans" /> </target> </project> |
<?xml version="1.0" encoding="UTF-8"?> <bean id="userService" <bean name="UserService" |
package test; import java.net.MalformedURLException; package test; import java.net.MalformedURLException; import org.apache.xmlbeans.XmlObject; import com.zx.xfiretext.domain.User; /** UserServiceClient userServiceClient = new UserServiceClient();
|
userId=123, userName=mgj, lastLogin=Sat Nov 01 17:27:50 CST 2008 <out xmlns="http://webserver.xfiretext.zx.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <accountId xmlns="http://domain.xfiretext.zx.com">testAccount</accountId> <lastLogin xmlns="http://domain.xfiretext.zx.com">2008-11-01T17:27:51.343+08:00</lastLogin> <userId xmlns="http://domain.xfiretext.zx.com">123</userId> <userName xmlns="http://domain.xfiretext.zx.com">mgj</userName> </out> accountId: testAccount userId:123 |