Linux实践记录
1. postgre导入csv命令
`\copy pm_faultcontent from '/mnt/postgresdata/inst/data/pm_faultcontent.csv' with csv`
- 应取文件绝对地址,在配置的postgre_data的环境变量时,相对地址或者直接写文件名的方式可行。 - with csv header/delimiter 不可行,有时间深究
2. sudu相关
2.1 curl
sudo curl --location --request POST 'http://8.8.8.8/*/*' --header 'access_key: *' --header 'Content-Type: application/json' --data-raw '{ "requestTime":"2021-12-07T12:05:43.862Z", "particularInfo":"MTdNSU1BAgYVDCIKLAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAG4AAABsAAAASwAAAEsAAAMhAAADWQAABgsAAAAKAAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" } '
2.1.1 postman向WebService暴露的接口发送请求
1. Url
形如:http://localhost:8080/webservice/DownLoadInfoService?wsdl
2. Headers
针对SOAPAction:并不存在一定要求必填

3. Body
首先xmlns:qf--> qf 可以自定义名称,并需要和下方的保持一致。另外这里需要指定代码里面webservice接口所指向的包路径地址
其次格式:
<qf:方法名>
// 针对String类型的参数,这里并不需要用“”标注
<参数名></参数名>
</qf:方法名>
1 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:qf="http://*/"> 2 <soapenv:Header/> 3 <soapenv:Body> 4 <qf:getTbDeliverStatus> 5 <carReqSeq>00a</carReqSeq> 6 <vehicleId>30</vehicleId> 7 <companyId>1</companyId> 8 </qf:getTbDeliverStatus> 9 </soapenv:Body> 10 </soapenv:Envelope>
4. Curl
1 sudo curl --location --request POST 'http://localhost:8080/webservice/webservice指定name?wsdl' --header 'access_key: *' --header 'Content-Type: text/xml' --header 'Cookie: JSESSIONID=6928A68FB2AC38FBA52D24DA24A4861A' --data-raw ' 2 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:qf="http://*/"> 3 <soapenv:Header/> 4 <soapenv:Body> 5 <qf:getTbDeliverStatus> 6 <carReqSeq>00a</carReqSeq> 7 <vehicleId>30</vehicleId> 8 <companyId>1</companyId> 9 </qf:getTbDeliverStatus> 10 </soapenv:Body> 11 </soapenv:Envelope>'
3.文件操作
# 查看文件行数
wc -l filename
# 文件前几行记录
head -n 10 filename
# 文件后几行记录
tail -n 10 filename
4.防火墙操作
# 查看防火墙状态
systemctl status firewalld.service
# 关闭防火墙
systemctl stop firewalld.service
# 启动防火墙
systemctl start firewalld.service
# 启动防火墙 持久化
systemctl enable firewalld.service
# 关闭防火墙 持久化
systemctl disable firewalld.service

浙公网安备 33010602011771号