Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-directcontrolservlet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6156bfc8
authored
2016-12-07 18:01:12 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Pass the mapped service-model into the checkSession service.
Refs: #7922
1 parent
33225dc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
6156bfc
...
...
@@ -396,6 +396,14 @@ public class DirectControlServlet extends HttpServlet {
Delegator
delegator
=
getDelegator
(
request
.
getServletContext
());
LocalDispatcher
dispatcher
=
getDispatcher
(
request
.
getServletContext
());
DispatchContext
dctx
=
dispatcher
.
getDispatchContext
();
ModelService
model
=
dctx
.
getModelService
(
serviceName
);
// some needed info for when running the service
Locale
locale
=
UtilHttp
.
getLocale
(
request
);
TimeZone
timeZone
=
UtilHttp
.
getTimeZone
(
request
);
List
<
Object
>
errorMessages
=
new
ArrayList
<
Object
>();
// Check if there is an output handler
...
...
@@ -427,7 +435,13 @@ public class DirectControlServlet extends HttpServlet {
// prolong the session
if
(
UtilValidate
.
isNotEmpty
(
checkSessionService
))
{
dispatcher
.
runSync
(
checkSessionService
,
UtilMisc
.<
String
,
Object
>
toMap
(
"sessionId"
,
authToken
,
"userLogin"
,
userLogin
));
Map
<
String
,
Object
>
checkSessionServiceContext
=
new
HashMap
<
String
,
Object
>();
checkSessionServiceContext
.
put
(
"sessionId"
,
authToken
);
checkSessionServiceContext
.
put
(
"userLogin"
,
userLogin
);
checkSessionServiceContext
.
put
(
"serviceModel"
,
model
);
ModelService
checkSessionModel
=
dctx
.
getModelService
(
checkSessionService
);
checkSessionServiceContext
=
checkSessionModel
.
makeValid
(
checkSessionServiceContext
,
ModelService
.
IN_PARAM
,
true
,
errorMessages
,
timeZone
,
locale
);
dispatcher
.
runSync
(
checkSessionService
,
checkSessionServiceContext
);
}
}
}
...
...
@@ -439,15 +453,6 @@ public class DirectControlServlet extends HttpServlet {
context
.
put
(
"httpProtocol"
,
request
.
getProtocol
());
context
.
put
(
"httpScheme"
,
request
.
getScheme
());
DispatchContext
dctx
=
dispatcher
.
getDispatchContext
();
ModelService
model
=
dctx
.
getModelService
(
serviceName
);
// some needed info for when running the service
Locale
locale
=
UtilHttp
.
getLocale
(
request
);
TimeZone
timeZone
=
UtilHttp
.
getTimeZone
(
request
);
List
<
Object
>
errorMessages
=
new
ArrayList
<
Object
>();
context
=
model
.
makeValid
(
context
,
ModelService
.
IN_PARAM
,
true
,
errorMessages
,
timeZone
,
locale
);
Map
<
String
,
Object
>
result
=
dispatcher
.
runSync
(
serviceName
,
context
);
...
...
Please
register
or
sign in
to post a comment