Flea RESTful interface
Related documents can refer to Flea RESTful interface specification.docx , click View raw to download
1. General overview
The Flea RESTful interface , that is, an interface that complies with the REST style, is developed based on Jersey and follows the JAX-RS specification. Applications that access the Flea RESTful interface provide RESTful Web Services (RESTful Web services, which are Web services that comply with the RESTful style). REST-style Web service is an application of ROA (Resource-Oriented Architecture). Its main feature is that the method information exists in HTTP methods (such as GET , PUT , POST , DELETE ), and the scope exists in the URI.
2. Interface definition
2.1 Interface protocol
Based on the HTTP protocol, the business access information messages support XML and JSON .
2.2 Interactive coding
Interactive content encoding is in UTF-8 format
2.3 Interface address
Server address/custom part (http://ffs.huazie.com/fleafs)
custom part The content of ApplicationPath can be seen in the following code
/**
* <p> FleaFS 资源入口 </p>
*
* @author huazie
* @version 1.0.0
* @since 1.0.0
*/
@ApplicationPath("/fleafs/*")
public class FleaFSResourceConfig extends FleaResourceConfig {
/**
* <p> 无参构造方法 </p>
*
* @since 1.0.0
*/
public FleaFSResourceConfig() {
super();
}
}
2.4 Request message
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JERSEY>
<REQUEST>
<PUBLIC>
<SYSTEM_ACCT_ID></SYSTEM_ACCT_ID>
<SYSTEM_ACCT_PWD></SYSTEM_ACCT_PWD>
<ACCT_ID></ACCT_ID>
<RESOURCE_CODE></RESOURCE_CODE>
<SERVICE_CODE></SERVICE_CODE>
</PUBLIC>
<BUSINESS>
<INPUT>业务入参JSON报文或XML报文</INPUT>
</BUSINESS>
</REQUEST>
</JERSEY>
2.5 Response message
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JERSEY>
<RESPONSE>
<PUBLIC>
<RESULT_CODE></RESULT_CODE>
<RESULT_MESS></RESULT_MESS>
</PUBLIC>
<BUSINESS>
<OUTPUT>业务出参JSON报文或XML报文</OUTPUT>
</BUSINESS>
</RESPONSE>
</JERSEY>