package com.ard.work.sdk.zlxd.netty.message.request;
|
|
import lombok.Data;
|
|
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
/**
|
* 所有XML请求的公共父类
|
* 提取公共属性和通用Header结构
|
*/
|
@Data
|
@XmlAccessorType(XmlAccessType.FIELD)
|
public class BaseXmlRequest {
|
|
/**
|
* 公共版本号属性
|
*/
|
@XmlAttribute(name = "Version")
|
private String version = "1.0";
|
|
/**
|
* 公共Header结构
|
*/
|
@XmlElement(name = "Header")
|
private Header header;
|
|
// 公共Header内部类
|
@Data
|
@XmlAccessorType(XmlAccessType.FIELD)
|
public static class Header {
|
@XmlAttribute(name = "Message_Type")
|
private String messageType;
|
|
@XmlAttribute(name = "Sequence_Number")
|
private int sequenceNumber;
|
|
@XmlAttribute(name = "Session_ID")
|
private String sessionId;
|
|
@XmlAttribute(name = "Source_ID")
|
private String sourceId;
|
|
@XmlAttribute(name = "Destination_ID")
|
private String destinationId;
|
|
public Header() {}
|
|
public Header(String messageType, int sequenceNumber, String sessionId, String sourceId, String destinationId) {
|
this.messageType = messageType;
|
this.sequenceNumber = sequenceNumber;
|
this.sessionId = sessionId;
|
this.sourceId = sourceId;
|
this.destinationId = destinationId;
|
}
|
}
|
}
|