| POST | /document/create |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Tạo văn bản
*/
public static class CreateDocumentRequest
{
public String title = null;
public String documentCode = null;
public String description = null;
public Integer documentPolicyId = null;
public Integer mainId = null;
public Integer scopeType = null;
public String getTitle() { return title; }
public CreateDocumentRequest setTitle(String value) { this.title = value; return this; }
public String getDocumentCode() { return documentCode; }
public CreateDocumentRequest setDocumentCode(String value) { this.documentCode = value; return this; }
public String getDescription() { return description; }
public CreateDocumentRequest setDescription(String value) { this.description = value; return this; }
public Integer getDocumentPolicyId() { return documentPolicyId; }
public CreateDocumentRequest setDocumentPolicyId(Integer value) { this.documentPolicyId = value; return this; }
public Integer getMainId() { return mainId; }
public CreateDocumentRequest setMainId(Integer value) { this.mainId = value; return this; }
public Integer getScopeType() { return scopeType; }
public CreateDocumentRequest setScopeType(Integer value) { this.scopeType = value; return this; }
}
public static class CreateDocumentResponse implements IResponseRequest
{
public Long id = null;
public Integer code = null;
public String message = null;
public Long getId() { return id; }
public CreateDocumentResponse setId(Long value) { this.id = value; return this; }
public Integer getCode() { return code; }
public CreateDocumentResponse setCode(Integer value) { this.code = value; return this; }
public String getMessage() { return message; }
public CreateDocumentResponse setMessage(String value) { this.message = value; return this; }
}
}
Java CreateDocumentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /document/create HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateDocumentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Description>String</Description>
<DocumentCode>String</DocumentCode>
<DocumentPolicyId>0</DocumentPolicyId>
<MainId>0</MainId>
<ScopeType>0</ScopeType>
<Title>String</Title>
</CreateDocumentRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel"> <Code>0</Code> <Id>0</Id> <Message>String</Message> </CreateDocumentResponse>