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
bb37ae76
Commit
bb37ae76
authored
Jul 12, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
dbe0cd36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
ServiceFactory.java
src/main/java/com/egolm/sso/util/ServiceFactory.java
+7
-6
No files found.
src/main/java/com/egolm/sso/util/ServiceFactory.java
View file @
bb37ae76
...
...
@@ -9,6 +9,7 @@ import javax.security.auth.callback.CallbackHandler;
import
javax.xml.namespace.QName
;
import
javax.xml.ws.Service
;
import
org.apache.cxf.endpoint.Client
;
import
org.apache.cxf.frontend.ClientProxy
;
import
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor
;
import
org.apache.ws.security.WSConstants
;
...
...
@@ -19,7 +20,7 @@ import com.egolm.sso.services.material_master.MaterialMasterService;
import
com.egolm.sso.services.material_master.Z_MT_SD_001_MATERIAL_MASTER
;
public
class
ServiceFactory
{
static
String
username
=
"test"
;
static
String
password
=
"78258c537d6e4d5fb210a57d05619fb6"
;
...
...
@@ -40,18 +41,18 @@ public class ServiceFactory {
QName
qName
=
new
QName
(
namespace
,
serviceName
);
Service
dyService
=
Service
.
create
(
WSDL_URL
,
qName
);
T
service
=
dyService
.
getPort
(
requiredType
);
ClientProxy
.
getClient
(
service
).
getOutInterceptors
().
add
(
new
WSS4JOutInterceptor
(
pro
));
Client
client
=
ClientProxy
.
getClient
(
service
);
client
.
getOutInterceptors
().
add
(
new
WSS4JOutInterceptor
(
pro
));
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
);
Z_MT_SD_001_MATERIAL_MASTER
bean
=
XMLUtil
.
toBeanByJxab
(
XML
,
Z_MT_SD_001_MATERIAL_MASTER
.
class
);
service
.
execute
(
bean
);
}
}
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