Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sso
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
曲欣亮
sso
Commits
43fcd76a
Commit
43fcd76a
authored
Jul 11, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
4c77ea8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
ServiceFactory.java
src/main/java/com/egolm/sso/util/ServiceFactory.java
+15
-2
DeletionServiceTest.java
src/test/java/test/DeletionServiceTest.java
+21
-0
No files found.
src/main/java/com/egolm/sso/util/ServiceFactory.java
View file @
43fcd76a
...
...
@@ -15,10 +15,13 @@ import org.apache.ws.security.WSConstants;
import
org.apache.ws.security.handler.WSHandlerConstants
;
import
org.apache.wss4j.common.ext.WSPasswordCallback
;
import
com.egolm.sso.services.material_master.MaterialMasterService
;
import
com.egolm.sso.services.material_master.Z_MT_SD_001_MATERIAL_MASTER
;
public
class
ServiceFactory
{
private
static
final
String
username
=
"test"
;
private
static
final
String
password
=
"78258c537d6e4d5fb210a57d05619fb6"
;
static
String
username
=
"test"
;
static
String
password
=
"78258c537d6e4d5fb210a57d05619fb6"
;
public
static
<
T
>
T
create
(
String
wsdlLocation
,
String
namespace
,
String
serviceName
,
Class
<
T
>
requiredType
)
throws
Exception
{
Map
<
String
,
Object
>
pro
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -41,4 +44,14 @@ public class ServiceFactory {
return
service
;
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
wsdlLocation
=
"http://localhost:8080/sso/services/material_master?wsdl"
;
String
namespace
=
"http://material_master.sso.egolm.com"
;
String
serviceName
=
"MaterialMasterService"
;
MaterialMasterService
service
=
create
(
wsdlLocation
,
namespace
,
serviceName
,
MaterialMasterService
.
class
);
String
XML
=
StringUtil
.
readText
(
"D:/data/sso/001.XML"
);
Z_MT_SD_001_MATERIAL_MASTER
Z_MT_SD_001_MATERIAL_MASTER
=
XMLUtil
.
toBeanByJxab
(
XML
,
Z_MT_SD_001_MATERIAL_MASTER
.
class
);
service
.
execute
(
Z_MT_SD_001_MATERIAL_MASTER
);
}
}
src/test/java/test/DeletionServiceTest.java
0 → 100644
View file @
43fcd76a
package
test
;
import
com.egolm.sso.services.dn_deletion.DNDeletionService
;
import
com.egolm.sso.services.dn_deletion.Z_MT_SD_010_SO_DN_DELETION
;
import
com.egolm.sso.util.ServiceFactory
;
import
com.egolm.sso.util.StringUtil
;
import
com.egolm.sso.util.XMLUtil
;
public
class
DeletionServiceTest
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
wsdlLocation
=
"http://localhost:8080/sso/services/dn_deletion?wsdl"
;
String
namespace
=
"http://dn_deletion.sso.egolm.com"
;
String
serviceName
=
"DNDeletionService"
;
DNDeletionService
service
=
ServiceFactory
.
create
(
wsdlLocation
,
namespace
,
serviceName
,
DNDeletionService
.
class
);
String
XML
=
StringUtil
.
readText
(
"D:/data/sso/002.XML"
);
Z_MT_SD_010_SO_DN_DELETION
Z_MT_SD_010_SO_DN_DELETION
=
XMLUtil
.
toBeanByJxab
(
XML
,
Z_MT_SD_010_SO_DN_DELETION
.
class
);
service
.
execute
(
Z_MT_SD_010_SO_DN_DELETION
);
}
}
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