<?xml version="1.0"?> <Results xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Code>0</Code> <Message /> <Data xsi:type="BillQueryResponse"> <InvtHead> <EportListNo></EportListNo> <VrfdedMarkcd></VrfdedMarkcd> </InvtHead> <ListDetail> <InvtList> <BillListFullEntity> <BillListFullEntity> <ListGNo></ListGNo> <GNo></GNo> </BillListFullEntity> <BillListFullEntity> <ListGNo></ListGNo> <GNo></GNo> </BillListFullEntity> </BillListFullEntity> </InvtList> <InvtDtList> <BillListFullEntity /> </InvtDtList> </ListDetail> <InOutList> <InOutStoreEntity /> </InOutList> </Data> <KeyInfo /> </Results>以注解形式生成相对应的java类
时间: 2023-08-17 20:28:19 浏览: 168
web.xml的配置文件
以下是根据XML生成的java类:
```java
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@XmlRootElement(name = "Results")
@XmlType(propOrder = {"code", "message", "data", "keyInfo"})
public class Results {
private int code;
private String message;
private BillQueryResponse data;
private String keyInfo;
@XmlElement(name = "Code")
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
@XmlElement(name = "Message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@XmlElement(name = "Data")
public BillQueryResponse getData() {
return data;
}
public void setData(BillQueryResponse data) {
this.data = data;
}
@XmlElement(name = "KeyInfo")
public String getKeyInfo() {
return keyInfo;
}
public void setKeyInfo(String keyInfo) {
this.keyInfo = keyInfo;
}
}
@XmlType(propOrder = {"invtHead", "listDetail", "inOutList"})
class BillQueryResponse {
private InvtHead invtHead;
private ListDetail listDetail;
private InOutList inOutList;
@XmlElement(name = "InvtHead")
public InvtHead getInvtHead() {
return invtHead;
}
public void setInvtHead(InvtHead invtHead) {
this.invtHead = invtHead;
}
@XmlElement(name = "ListDetail")
public ListDetail getListDetail() {
return listDetail;
}
public void setListDetail(ListDetail listDetail) {
this.listDetail = listDetail;
}
@XmlElement(name = "InOutList")
public InOutList getInOutList() {
return inOutList;
}
public void setInOutList(InOutList inOutList) {
this.inOutList = inOutList;
}
}
class InvtHead {
private String eportListNo;
private String vrfdedMarkcd;
@XmlElement(name = "EportListNo")
public String getEportListNo() {
return eportListNo;
}
public void setEportListNo(String eportListNo) {
this.eportListNo = eportListNo;
}
@XmlElement(name = "VrfdedMarkcd")
public String getVrfdedMarkcd() {
return vrfdedMarkcd;
}
public void setVrfdedMarkcd(String vrfdedMarkcd) {
this.vrfdedMarkcd = vrfdedMarkcd;
}
}
@XmlType(propOrder = {"invtList", "invtDtList"})
class ListDetail {
private InvtList invtList;
private InvtDtList invtDtList;
@XmlElement(name = "InvtList")
public InvtList getInvtList() {
return invtList;
}
public void setInvtList(InvtList invtList) {
this.invtList = invtList;
}
@XmlElement(name = "InvtDtList")
public InvtDtList getInvtDtList() {
return invtDtList;
}
public void setInvtDtList(InvtDtList invtDtList) {
this.invtDtList = invtDtList;
}
}
class InvtList {
private BillListFullEntity[] billListFullEntity;
@XmlElement(name = "BillListFullEntity")
public BillListFullEntity[] getBillListFullEntity() {
return billListFullEntity;
}
public void setBillListFullEntity(BillListFullEntity[] billListFullEntity) {
this.billListFullEntity = billListFullEntity;
}
}
class InvtDtList {
private BillListFullEntity billListFullEntity;
@XmlElement(name = "BillListFullEntity")
public BillListFullEntity getBillListFullEntity() {
return billListFullEntity;
}
public void setBillListFullEntity(BillListFullEntity billListFullEntity) {
this.billListFullEntity = billListFullEntity;
}
}
class InOutList {
private InOutStoreEntity inOutStoreEntity;
@XmlElement(name = "InOutStoreEntity")
public InOutStoreEntity getInOutStoreEntity() {
return inOutStoreEntity;
}
public void setInOutStoreEntity(InOutStoreEntity inOutStoreEntity) {
this.inOutStoreEntity = inOutStoreEntity;
}
}
class BillListFullEntity {
private String listGNo;
private String gNo;
@XmlElement(name = "ListGNo")
public String getListGNo() {
return listGNo;
}
public void setListGNo(String listGNo) {
this.listGNo = listGNo;
}
@XmlElement(name = "GNo")
public String getgNo() {
return gNo;
}
public void setgNo(String gNo) {
this.gNo = gNo;
}
}
class InOutStoreEntity {
// empty class
}
```
阅读全文