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
91bf6c59
Commit
91bf6c59
authored
Aug 13, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
957005c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
18 deletions
+6
-18
SI004INVENTORYSyncOutServiceTask.java
...TORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
+2
-1
SI011ACTUALSALESSyncOutServiceTask.java
...ES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
+2
-1
ServiceFactory.java
src/main/java/com/egolm/sso/clients/ServiceFactory.java
+0
-15
ZMISD009SOCREATIONServiceTask.java
..._MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
+2
-1
No files found.
src/main/java/com/egolm/sso/clients/SI_004_INVENTORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
View file @
91bf6c59
...
...
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.sso.clients.ServiceFactory
;
import
com.egolm.sso.clients.ServiceFactory.PasswordType
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.TraceService
;
...
...
@@ -68,7 +69,7 @@ public class SI004INVENTORYSyncOutServiceTask {
File
folder
=
jarFile
.
getParentFile
();
String
absolutePath
=
folder
.
getAbsolutePath
();
String
wsdlLocation
=
"file:///"
+
absolutePath
+
"/"
+
WSDLPATH
+
"/SI_004_INVENTORY_SyncOutService.wsdl"
;
SI004INVENTORYSyncOut
service
=
ServiceFactory
.
create
(
SI004INVENTORYSyncOut
.
class
,
wsdlLocation
,
SI004INVENTORYSyncOutService
.
SERVICE
,
SI004INVENTORYSyncOutService
.
HTTPPort
,
username
,
password
);
SI004INVENTORYSyncOut
service
=
ServiceFactory
.
create
(
SI004INVENTORYSyncOut
.
class
,
wsdlLocation
,
SI004INVENTORYSyncOutService
.
SERVICE
,
SI004INVENTORYSyncOutService
.
HTTPPort
,
username
,
password
,
PasswordType
.
PasswordText
);
this
.
sendData
(
service
);
}
...
...
src/main/java/com/egolm/sso/clients/SI_011_ACTUAL_SALES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
View file @
91bf6c59
...
...
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.sso.clients.ServiceFactory
;
import
com.egolm.sso.clients.ServiceFactory.PasswordType
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.TraceService
;
...
...
@@ -68,7 +69,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
File
folder
=
jarFile
.
getParentFile
();
String
absolutePath
=
folder
.
getAbsolutePath
();
String
wsdlLocation
=
"file:///"
+
absolutePath
+
"/"
+
WSDLPATH
+
"/SI_011_ACTUAL_SALES_SyncOutService.wsdl"
;
SI011ACTUALSALESSyncOut
service
=
ServiceFactory
.
create
(
SI011ACTUALSALESSyncOut
.
class
,
wsdlLocation
,
SI011ACTUALSALESSyncOutService
.
SERVICE
,
SI011ACTUALSALESSyncOutService
.
HTTPPort
,
username
,
password
);
SI011ACTUALSALESSyncOut
service
=
ServiceFactory
.
create
(
SI011ACTUALSALESSyncOut
.
class
,
wsdlLocation
,
SI011ACTUALSALESSyncOutService
.
SERVICE
,
SI011ACTUALSALESSyncOutService
.
HTTPPort
,
username
,
password
,
PasswordType
.
PasswordText
);
this
.
sendData
(
service
);
}
...
...
src/main/java/com/egolm/sso/clients/ServiceFactory.java
View file @
91bf6c59
...
...
@@ -18,10 +18,6 @@ import org.apache.wss4j.common.ext.WSPasswordCallback;
import
com.egolm.sso.config.XRException
;
public
class
ServiceFactory
{
public
static
<
T
>
T
create
(
Class
<
T
>
requiredType
,
String
wsdlLocation
,
QName
serviceQName
,
QName
portQName
,
String
username
,
String
password
)
{
return
create
(
requiredType
,
wsdlLocation
,
serviceQName
,
portQName
,
username
,
password
,
PasswordType
.
PasswordText
);
}
public
static
<
T
>
T
create
(
Class
<
T
>
requiredType
,
String
wsdlLocation
,
QName
serviceQName
,
QName
portQName
,
String
username
,
String
password
,
PasswordType
passwordType
)
{
try
{
...
...
@@ -47,17 +43,6 @@ public class ServiceFactory {
}
}
public
static
<
T
>
T
create
(
Class
<
T
>
requiredType
,
String
wsdlLocation
,
QName
serviceQName
,
QName
portQName
)
{
try
{
URL
WSDL_URL
=
new
URL
(
wsdlLocation
);
Service
dyService
=
Service
.
create
(
WSDL_URL
,
serviceQName
);
T
service
=
dyService
.
getPort
(
portQName
,
requiredType
);
return
service
;
}
catch
(
MalformedURLException
e
)
{
throw
new
XRException
(
e
);
}
}
public
enum
PasswordType
{
PasswordText
,
PasswordNone
,
PasswordDigest
}
...
...
src/main/java/com/egolm/sso/clients/Z_MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
View file @
91bf6c59
...
...
@@ -17,6 +17,7 @@ import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.stereotype.Component
;
import
com.egolm.sso.clients.ServiceFactory
;
import
com.egolm.sso.clients.ServiceFactory.PasswordType
;
import
com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.Header
;
import
com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.ITEM
;
import
com.egolm.sso.config.XRException
;
...
...
@@ -67,7 +68,7 @@ public class ZMISD009SOCREATIONServiceTask {
File
folder
=
jarFile
.
getParentFile
();
String
absolutePath
=
folder
.
getAbsolutePath
();
String
wsdlLocation
=
"file:///"
+
absolutePath
+
"/"
+
WSDLPATH
+
"/Z_MI_SD_009_SO_CREATION.wsdl"
;
ZMISD009SOCREATION
service
=
ServiceFactory
.
create
(
ZMISD009SOCREATION
.
class
,
wsdlLocation
,
ZMISD009SOCREATIONService
.
SERVICE
,
ZMISD009SOCREATIONService
.
ZMISD009SOCREATIONPort
,
username
,
password
);
ZMISD009SOCREATION
service
=
ServiceFactory
.
create
(
ZMISD009SOCREATION
.
class
,
wsdlLocation
,
ZMISD009SOCREATIONService
.
SERVICE
,
ZMISD009SOCREATIONService
.
ZMISD009SOCREATIONPort
,
username
,
password
,
PasswordType
.
PasswordText
);
this
.
sendData
(
service
);
}
...
...
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