第二課.Axis2 返回數組

1.返回函數

public  ResultXxglBean  findXxglBeanBySubject(String subject,int preNum){	
		
		ResultXxglBean  rs=new ResultXxglBean();
        return rs; 

      }

2.數據類型 

public class ResultXxglBean {
	
	private CallResult callResult;
	
	
	private Xxgl[]  xxglArray ;
	private  String explanMessage;  //說明信息
	
	private String  preUrl;
	
	public CallResult getCallResult() {
		return callResult;
	}
	public void setCallResult(CallResult callResult) {
		this.callResult = callResult;
	}
	public Xxgl[] getXxglArray() {
		return xxglArray;
	}
	public void setXxglArray(Xxgl[] xxglArray) {
		this.xxglArray = xxglArray;
	}
	public String getExplanMessage() {
		return   explanMessage;
}
public class Xxgl implements java.io.Serializable {

	// Fields

	private String id;
	private String flFormName;         //表單名稱
	private String flSubject;          //標題
	private String flCreateDept;       //建立部門	
	private Date flCreateDate;         //建立時間
	private String flCreator;          //建立人
	private String flCreatorPhone;	   //聯繫電話
	private String flContent;          //內容
	private Short status;// 0草稿,1在辦,2已辦, 9刪除,10取消發佈
}

3.測試效果

    a.傳入參數java

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ecin="http://ecinc.com.cn">
   <soapenv:Header/>
   <soapenv:Body>
      <ecin:findXxglBeanBySubject>
         <!--Optional:-->
         <ecin:subject>1</ecin:subject>
         <!--Optional:-->
         <ecin:preNum>2</ecin:preNum>
      </ecin:findXxglBeanBySubject>
   </soapenv:Body>
</soapenv:Envelope>

b.返回結果web

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:findXxglBeanBySubjectResponse xmlns:ns="http://ecinc.com.cn">
         <ns:return xsi:type="ax223:ResultXxglBean" xmlns:ax221="http://model.ws.oa.com.cn/xsd" xmlns:ax223="http://webservice.xxfbzxxxgl.oa.com.cn/xsd" xmlns:ax225="http://model.xxfbzxxxgl.oa.com.cn/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ax223:callResult xsi:type="ax221:CallResult">
               <ax221:msg>搜索成功!</ax221:msg>
               <ax221:result>success</ax221:result>
            </ax223:callResult>
            <ax223:explanMessage xsi:nil="true"/>
            <ax223:preUrl>http://127.0.0.1:8080/HNFGWOA_MySQL_V1.0/mobileoa/ssoLogin!ssologin.action?RedirectTo=/xxfbzxxxgl/xxglAciton!findwordPagebyId.action?id=</ax223:preUrl>
            <ax223:xxglArray xsi:type="ax225:Xxgl">
               <ax225:categoryCode xsi:nil="true"/>
               <ax225:categoryValue>信息中心</ax225:categoryValue>
               <ax225:flContent xsi:nil="true"/>
               <ax225:flCreateDate>2016-08-30</ax225:flCreateDate>
               <ax225:flCreateDept>重點項目辦</ax225:flCreateDept>
               <ax225:flCreator>曹楨</ax225:flCreator>
               <ax225:flCreatorPhone>15010296090</ax225:flCreatorPhone>
               <ax225:flFormName xsi:nil="true"/>
               <ax225:flSubject>1111111</ax225:flSubject>
               <ax225:id>5386abd39b244f21a66e6adbd64f94be</ax225:id>
               <ax225:num xsi:nil="true"/>
               <ax225:releaseTime>2016-08-24</ax225:releaseTime>
               <ax225:status>2</ax225:status>
            </ax223:xxglArray>
            <ax223:xxglArray xsi:type="ax225:Xxgl">
               <ax225:categoryCode xsi:nil="true"/>
               <ax225:categoryValue>黨政廉風建設</ax225:categoryValue>
               <ax225:flContent xsi:nil="true"/>
               <ax225:flCreateDate>2016-08-30</ax225:flCreateDate>
               <ax225:flCreateDept>重點項目辦</ax225:flCreateDept>
               <ax225:flCreator>曹楨</ax225:flCreator>
               <ax225:flCreatorPhone>15010296090</ax225:flCreatorPhone>
               <ax225:flFormName xsi:nil="true"/>
               <ax225:flSubject>111</ax225:flSubject>
               <ax225:id>9853b79c1d1445329b1b673cd88621aa</ax225:id>
               <ax225:num xsi:nil="true"/>
               <ax225:releaseTime>2016-08-16</ax225:releaseTime>
               <ax225:status>2</ax225:status>
            </ax223:xxglArray>
         </ns:return>
      </ns:findXxglBeanBySubjectResponse>
   </soapenv:Body>
</soapenv:Envelope>
相關文章
相關標籤/搜索