Commit ed88075e authored by Quxl's avatar Quxl

x

parent df432dca
......@@ -9,7 +9,6 @@ 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;
......@@ -21,6 +20,7 @@ import com.egolm.sso.services.material_master.Z_MT_SD_001_MATERIAL_MASTER;
public class ServiceFactory {
static boolean isUsedAuth = false;
static String username = "test";
static String password = "78258c537d6e4d5fb210a57d05619fb6";
......@@ -41,8 +41,9 @@ public class ServiceFactory {
QName qName = new QName(namespace, serviceName);
Service dyService = Service.create(WSDL_URL, qName);
T service = dyService.getPort(requiredType);
// Client client = ClientProxy.getClient(service);
// client.getOutInterceptors().add(new WSS4JOutInterceptor(pro));
if(isUsedAuth) {
ClientProxy.getClient(service).getOutInterceptors().add(new WSS4JOutInterceptor(pro));
}
return service;
}
......
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