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