Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
Project
Project
Details
Activity
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
曲欣亮
sap-service
Commits
e66843cb
Commit
e66843cb
authored
Aug 14, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
9fce53b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
SAPServiceFactory.java
src/main/java/com/egolm/sso/clients/SAPServiceFactory.java
+15
-0
SI004INVENTORYSyncOutServiceTask.java
...TORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
+1
-2
SI009SOCREATIONAsynOutServiceTask.java
...ION_AsynOutService/SI009SOCREATIONAsynOutServiceTask.java
+1
-2
SI011ACTUALSALESSyncOutServiceTask.java
...ES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
+1
-2
application.yml
src/main/resources/application.yml
+3
-3
No files found.
src/main/java/com/egolm/sso/clients/SAPServiceFactory.java
View file @
e66843cb
package
com
.
egolm
.
sso
.
clients
;
import
java.io.File
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -16,6 +18,7 @@ import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
import
org.apache.ws.security.handler.WSHandlerConstants
;
import
org.apache.wss4j.common.ext.WSPasswordCallback
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.system.ApplicationHome
;
import
org.springframework.stereotype.Component
;
@Component
...
...
@@ -38,6 +41,18 @@ public class SAPServiceFactory {
ClientProxy
.
getClient
(
service
).
getOutInterceptors
().
add
(
getWSS4JOutInterceptor
());
return
service
;
}
private
static
String
absolutePath
=
null
;
public
URL
getAbsoluteURL
(
String
WSDLPATH
)
throws
MalformedURLException
{
if
(
absolutePath
==
null
)
{
ApplicationHome
home
=
new
ApplicationHome
(
getClass
());
File
jarFile
=
home
.
getSource
();
File
folder
=
jarFile
.
getParentFile
();
absolutePath
=
folder
.
getAbsolutePath
();
}
return
new
URL
(
"file:///"
+
absolutePath
+
"/"
+
WSDLPATH
);
}
private
WSS4JOutInterceptor
wss4JOutInterceptor
=
null
;
...
...
src/main/java/com/egolm/sso/clients/SI_004_INVENTORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
View file @
e66843cb
...
...
@@ -2,7 +2,6 @@ package com.egolm.sso.clients.SI_004_INVENTORY_SyncOutService;
import
java.math.BigInteger
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -67,7 +66,7 @@ public class SI004INVENTORYSyncOutServiceTask {
}
public
void
runTask
()
throws
MalformedURLException
{
SI004INVENTORYSyncOut
service
=
new
SI004INVENTORYSyncOutService
(
new
URL
(
WSDLPATH
)).
getPort
(
SI004INVENTORYSyncOut
.
class
);
SI004INVENTORYSyncOut
service
=
new
SI004INVENTORYSyncOutService
(
factory
.
getAbsolute
URL
(
WSDLPATH
)).
getPort
(
SI004INVENTORYSyncOut
.
class
);
ClientProxy
.
getClient
(
service
).
getOutInterceptors
().
add
(
factory
.
getWSS4JOutInterceptor
());
this
.
sendData
(
service
);
}
...
...
src/main/java/com/egolm/sso/clients/SI_009_SO_CREATION_AsynOutService/SI009SOCREATIONAsynOutServiceTask.java
View file @
e66843cb
package
com
.
egolm
.
sso
.
clients
.
SI_009_SO_CREATION_AsynOutService
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -66,7 +65,7 @@ public class SI009SOCREATIONAsynOutServiceTask {
}
public
void
runTask
()
throws
MalformedURLException
{
SI009SOCREATIONAsynOut
service
=
new
SI009SOCREATIONAsynOutService
(
new
URL
(
WSDLPATH
)).
getPort
(
SI009SOCREATIONAsynOut
.
class
);
SI009SOCREATIONAsynOut
service
=
new
SI009SOCREATIONAsynOutService
(
factory
.
getAbsolute
URL
(
WSDLPATH
)).
getPort
(
SI009SOCREATIONAsynOut
.
class
);
ClientProxy
.
getClient
(
service
).
getOutInterceptors
().
add
(
factory
.
getWSS4JOutInterceptor
());
this
.
sendData
(
service
);
}
...
...
src/main/java/com/egolm/sso/clients/SI_011_ACTUAL_SALES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
View file @
e66843cb
...
...
@@ -2,7 +2,6 @@ package com.egolm.sso.clients.SI_011_ACTUAL_SALES_SyncOutService;
import
java.math.BigInteger
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -67,7 +66,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
}
public
void
runTask
()
throws
MalformedURLException
{
SI011ACTUALSALESSyncOut
service
=
new
SI011ACTUALSALESSyncOutService
(
new
URL
(
WSDLPATH
)).
getPort
(
SI011ACTUALSALESSyncOut
.
class
);
SI011ACTUALSALESSyncOut
service
=
new
SI011ACTUALSALESSyncOutService
(
factory
.
getAbsolute
URL
(
WSDLPATH
)).
getPort
(
SI011ACTUALSALESSyncOut
.
class
);
ClientProxy
.
getClient
(
service
).
getOutInterceptors
().
add
(
factory
.
getWSS4JOutInterceptor
());
this
.
sendData
(
service
);
}
...
...
src/main/resources/application.yml
View file @
e66843cb
...
...
@@ -6,9 +6,9 @@ CRON:
N004
:
0 20 0 * * ?
N011
:
0 30 0 * * ?
WSDL
:
N009
:
file:
WSDL/SI_009_SO_CREATION_AsynOutService.wsdl
N004
:
file:
WSDL/SI_004_INVENTORY_SyncOutService.wsdl
N011
:
file:
WSDL/SI_011_ACTUAL_SALES_SyncOutService.wsdl
N009
:
WSDL/SI_009_SO_CREATION_AsynOutService.wsdl
N004
:
WSDL/SI_004_INVENTORY_SyncOutService.wsdl
N011
:
WSDL/SI_011_ACTUAL_SALES_SyncOutService.wsdl
server
:
port
:
8080
spring
:
...
...
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