2
我有一個web服務,它從數據庫中提取細節並返回到調用system.the特定標記的輸出可以有多個項目(父標記將有多個項目),而是它正在返回同樣的領域一次又一次。任何人都可以請幫忙。Web服務多次返回父標記
電流輸出
<emergencyEmails >[email protected]</emergencyEmails >
<emergencyEmails >[email protected]</emergencyEmails >
<emergencyEmails >[email protected]</emergencyEmails >
我希望它是這樣
<emergencyEmails >
<item>[email protected]</item>
<item>[email protected]</item>
<item>[email protected]</item>
</emergencyEmails >
電子郵件字段被定義爲一個字符串數組
package com.business.services;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@XmlType(propOrder={"companyId", "emergencyEmails", "language", "normalEmails", "timezone"})
public class ProfileDetails
{
private String companyId = null;
private String[] emergencyEmails = null;
private String language = null;
public String getCompanyId()
{
return this.companyId;
}
public void setCompanyId(String companyId)
{
this.companyId = companyId;
}
public String[] getEmergencyEmails()
{
return this.emergencyEmails;
}
public void setEmergencyEmails(String[] emergencyEmails)
{
this.emergencyEmails = emergencyEmails;
}
public String getLanguage()
{
return this.language;
}
public void setLanguage(String language)
{
this.language = language;
}
}
Thannks很多.worked完美。 – user2134322