Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-support-rlwx
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rl
hls-support-rlwx
Commits
e34160ab
Commit
e34160ab
authored
Aug 10, 2021
by
5359
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中登网开发
parent
d9c0f852
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
9 deletions
+53
-9
ZdwWsRequestsServiceImpl.java
.../zhongDengWang/service/impl/ZdwWsRequestsServiceImpl.java
+53
-9
No files found.
core/src/main/java/com/hand/app/zhongDengWang/service/impl/ZdwWsRequestsServiceImpl.java
View file @
e34160ab
...
@@ -128,8 +128,44 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
...
@@ -128,8 +128,44 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
return
hlsWsRequests
;
return
hlsWsRequests
;
}
}
public
JSONObject
registerInit
(
String
registerTypeBz
,
String
platformAuthCode
,
String
loginToken
,
String
xmlFileName
,
String
xmlFileContent
)
{
JSONObject
resultJson
=
new
JSONObject
();
String
encryXmlFileContent
=
""
;
String
encryLoginToken
=
""
;
String
attachmentZipPath
=
""
;
String
encryPlatformAuthCode
=
""
;
try
{
/*SM2算法加密*/
encryLoginToken
=
SM2Utils
.
encryptByKeyStr
(
loginToken
,
clientKey
);
encryXmlFileContent
=
SM2Utils
.
encryptByKeyStr
(
xmlFileContent
,
clientKey
);
encryPlatformAuthCode
=
SM2Utils
.
encryptByKeyStr
(
platformAuthCode
,
clientKey
);
WSInitRegisterServiceService
service
=
new
WSInitRegisterServiceService
();
WSInitRegisterService
reg
=
service
.
getWSInitRegisterServicePort
();
/*插入接口日志表*/
byte
[]
returns
=
reg
.
initRegister
(
registerTypeBz
.
getBytes
(),
encryPlatformAuthCode
.
getBytes
(),
encryLoginToken
.
getBytes
(),
xmlFileName
.
getBytes
(),
encryXmlFileContent
.
getBytes
(),
ClientUtils
.
getAttachmentZip
(
attachmentZipPath
));
// byte[] returns = "<feedback>\n<registertype>LR</registertype>\n<registerresult>001</registerresult>\n<registernumber>I0000001</registernumber>\n<authorizationcode>A0000001</authorizationcode>\n<errors>\n<error>RegInfoError:100_001</error>\n</errors>\n</feedback>\n".getBytes();
resultJson
.
put
(
"code"
,
"0"
);
resultJson
.
put
(
"info"
,
new
String
(
returns
));
System
.
out
.
println
(
"dddd"
+
new
String
(
returns
));
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
resultJson
.
put
(
"code"
,
"-1"
);
resultJson
.
put
(
"info"
,
e
.
getMessage
());
}
return
resultJson
;
}
/***
/***
*
初始登记
;
*
融资租赁-登记入口方法
;
* @param request
* @param request
* @param batchId
* @param batchId
***/
***/
...
@@ -194,21 +230,30 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
...
@@ -194,21 +230,30 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
xmlFileContent
=
new
String
(
ClientUtils
.
getxmlFileContent
(
fndAtmAttachmentDto
.
getFilePath
()));
xmlFileContent
=
new
String
(
ClientUtils
.
getxmlFileContent
(
fndAtmAttachmentDto
.
getFilePath
()));
/*SM2算法加密*/
/*SM2算法加密*/
loginToken
=
SM2Utils
.
encryptByKeyStr
(
loginToken
,
clientKey
);
//
loginToken = SM2Utils.encryptByKeyStr(loginToken, clientKey);
encryXmlFileContent
=
SM2Utils
.
encryptByKeyStr
(
xmlFileContent
,
clientKey
);
//
encryXmlFileContent = SM2Utils.encryptByKeyStr(xmlFileContent, clientKey);
platformAuthCode
=
SM2Utils
.
encryptByKeyStr
(
platformAuthCode
,
clientKey
);
//
platformAuthCode = SM2Utils.encryptByKeyStr(platformAuthCode, clientKey);
// WSInitRegisterServiceService service = new WSInitRegisterServiceService();
// WSInitRegisterServiceService service = new WSInitRegisterServiceService();
// WSInitRegisterService reg = service.getWSInitRegisterServicePort();
// WSInitRegisterService reg = service.getWSInitRegisterServicePort();
/*插入接口日志表*/
/*插入接口日志表*/
HlsWsRequests
hlsWsRequests
=
createRequestLog
(
"https://ws.zhongdengwang.org.cn/mfrs_ws_test/services/InitRegisterService?wsdl"
,
xmlFileContent
,
batch
.
getLineId
());
HlsWsRequests
hlsWsRequests
=
createRequestLog
(
"https://ws.zhongdengwang.org.cn/mfrs_ws_test/services/InitRegisterService?wsdl"
,
xmlFileContent
,
batch
.
getLineId
());
// byte[] returns = reg.initRegister(fndZhongDengLines.getTypebz().getBytes(), platformAuthCode.getBytes(), loginToken.getBytes(), "lr".getBytes(), encryXmlFileContent.getBytes(), ClientUtils.getAttachmentZip(attachmentZipPath));
// byte[] returns = reg.initRegister(fndZhongDengLines.getTypebz().getBytes(), platformAuthCode.getBytes(), loginToken.getBytes(), fndAtmAttachmentDto.getFileName().getBytes(), encryXmlFileContent.getBytes(), ClientUtils.getAttachmentZip(attachmentZipPath));
byte
[]
returns
=
"<feedback>\n<registertype>LR</registertype>\n<registerresult>001</registerresult>\n<registernumber>I0000001</registernumber>\n<authorizationcode>A0000001</authorizationcode>\n<errors>\n<error>RegInfoError:100_001</error>\n</errors>\n</feedback>\n"
.
getBytes
();
// if ("INIT".equalsIgnoreCase(fndZhongDengLines.getUpStage())) {
hlsWsRequests
.
setResponseClob
(
new
String
(
returns
));
//resultJson = registerInit(fndZhongDengLines.getTypebz(), platformAuthCode, loginToken, fndAtmAttachmentDto.getFileName(), xmlFileContent);
// }
String
returns
=
""
;
// if ("0".equalsIgnoreCase(resultJson.getString("code"))) {
// returns = resultJson.getString("info");
// } else {
// returns = "<feedback>\n<registertype>LR</registertype>\n<registerresult>001</registerresult>\n<registernumber>I0000001</registernumber>\n<authorizationcode>A0000001</authorizationcode>\n<errors>\n<error>\n" + resultJson.getString("info") + "</error>\n</errors>\n</feedback>\n";
// }
returns
=
"<feedback>\n<registertype>LR</registertype>\n<registerresult>001</registerresult>\n<registernumber>I0000001</registernumber>\n<authorizationcode>A0000001</authorizationcode>\n<errors>\n<error>RegInfoError:100_001</error>\n</errors>\n</feedback>\n"
;
hlsWsRequests
.
setResponseClob
(
returns
);
/*解析接口返回结果*/
/*解析接口返回结果*/
returnJson
=
XML
.
toJSONObject
(
new
String
(
returns
)
);
returnJson
=
XML
.
toJSONObject
(
returns
);
registerResult
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"registerresult"
);
registerResult
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"registerresult"
);
registerNumber
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"registernumber"
);
registerNumber
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"registernumber"
);
authorizationCode
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"authorizationcode"
);
authorizationCode
=
returnJson
.
getJSONObject
(
"feedback"
).
getString
(
"authorizationcode"
);
...
@@ -243,7 +288,6 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
...
@@ -243,7 +288,6 @@ public class ZdwWsRequestsServiceImpl implements IZdwWsRequestsService {
fndZhongDengLinesList
.
add
(
fndZhongDengLines
);
fndZhongDengLinesList
.
add
(
fndZhongDengLines
);
}
}
}
}
if
(
fndZhongDengLinesList
.
size
()
>
0
)
{
if
(
fndZhongDengLinesList
.
size
()
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment