Commit 384c3271 authored by Quxl's avatar Quxl

x

parent a1d9b6ce
......@@ -50,14 +50,10 @@ public class SAPServiceFactory {
private String getAbsolutePath(String WSDLPATH) {
if(absolutePath == null) {
synchronized (absolutePath) {
if(absolutePath == null) {
ApplicationHome home = new ApplicationHome(getClass());
File jarFile = home.getSource();
File folder = jarFile.getParentFile();
absolutePath = folder.getAbsolutePath();
}
}
ApplicationHome home = new ApplicationHome(getClass());
File jarFile = home.getSource();
File folder = jarFile.getParentFile();
absolutePath = folder.getAbsolutePath();
}
return "file:///" + absolutePath + "/" + WSDLPATH;
}
......@@ -66,23 +62,19 @@ public class SAPServiceFactory {
public WSS4JOutInterceptor getWSS4JOutInterceptor() {
if(wss4JOutInterceptor == null) {
synchronized (wss4JOutInterceptor) {
if(wss4JOutInterceptor == null) {
Map<String, Object> pro = new HashMap<String, Object>();
pro.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
pro.put(WSHandlerConstants.USER, username);
pro.put(WSHandlerConstants.PASSWORD_TYPE, PasswordType.PasswordText.name());
pro.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() {
public void handle(Callback[] callbacks) {
for (int i = 0; i < callbacks.length; i++) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
pc.setPassword(password);
}
}
});
wss4JOutInterceptor = new WSS4JOutInterceptor(pro);
Map<String, Object> pro = new HashMap<String, Object>();
pro.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
pro.put(WSHandlerConstants.USER, username);
pro.put(WSHandlerConstants.PASSWORD_TYPE, PasswordType.PasswordText.name());
pro.put(WSHandlerConstants.PW_CALLBACK_REF, new CallbackHandler() {
public void handle(Callback[] callbacks) {
for (int i = 0; i < callbacks.length; i++) {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
pc.setPassword(password);
}
}
}
});
wss4JOutInterceptor = new WSS4JOutInterceptor(pro);
}
return wss4JOutInterceptor;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment