Subversion Repositories XServices

Compare Revisions

Regard whitespace Rev 170 → Rev 169

/SVN-ALFEventEmitter/trunk/src/net/brutex/emitter/ALFEmitter.java
29,9 → 29,7
import java.util.Map;
 
import javax.xml.stream.XMLStreamException;
 
import net.brutex.emitter.util.EmitterUtil;
import net.brutex.emitter.util.PasswordEncrypter;
import net.brutex.sbm.sbmappservices72.AEWebservicesFaultFault;
import net.brutex.sbm.sbmappservices72.Sbmappservices72PortType;
import net.brutex.sbm.sbmappservices72.api.Auth;
100,12 → 98,10
private static final String OPTION_EVENTMANAGER_URL = "eventmanager";
private static final String OPTION_EVENTMANAGER_USER = "eventmanager.user";
private static final String OPTION_EVENTMANAGER_PASSWORD = "eventmanager.password";
private static final String OPTION_EVENTMANAGER_ENCRYPTED = "eventmanager.encrypted";
private static final String OPTION_SBM_ENDPOINT = "sbmappservices72";
private static final String OPTION_SBM_USER = "sbmuser";
private static final String OPTION_SBM_PASSWORD = "sbmpassword";
private static final String OPTION_SBM_ENCRYPTED = "sbmencrypted";
private static final String OPTION_SBM_TABLE = "querytable";
private static final String OPTION_SBM_QUERY = "query";
 
136,6 → 132,11
private static final String PARAM_CONFIG = "conf";
//
//
//
private static final String CACHE_SBMPORT = "sbmappservices72";
//
// Member variables
//
private final String repos;
150,7 → 151,7
//Member for SBM endpoint configuration
private final String endpoint;
private final String sbm_user;
private String sbm_pass;
private final String sbm_pass;
private final String querytable;
private final String query;
 
194,7 → 195,7
*
* @param key property name
* @param defaultValue default value or null
* @param isRequired whether or not this is a required option
* @param isRequired wether or not this is a required option
* @param logmessage optional log message (or null)
* @return property value
* @throws ConfigurationException
327,11 → 328,8
*/
boolean isTrace = false;
if(isWithVerification) {
boolean isEncrypted;
isEncrypted = readConfPropertyAsBoolean(OPTION_SBM_ENCRYPTED, false, false, null);
sbm_user = readConfPropertyAsString(OPTION_SBM_USER, null, true, null);
sbm_pass = readConfPropertyAsString(OPTION_SBM_PASSWORD, null, false, null);
if(isEncrypted) sbm_pass = PasswordEncrypter.decrypt(sbm_pass);
endpoint = readConfPropertyAsString(OPTION_SBM_ENDPOINT, "http://localhost/gsoap/gsoap_ssl.dll?sbmappservices72", true, null);
querytable = readConfPropertyAsString(OPTION_SBM_TABLE, null, true, null);
query = readConfPropertyAsString(OPTION_SBM_QUERY, null, false, null);
472,10 → 470,7
private void addALFSecurity() throws ConfigurationException, JaxenException {
final String eventmanager_user = readConfPropertyAsString(OPTION_EVENTMANAGER_USER, null, false, null);
String eventmanager_pass = readConfPropertyAsString(OPTION_EVENTMANAGER_PASSWORD, null, false, null);
final boolean eventmanager_enc = readConfPropertyAsBoolean(OPTION_EVENTMANAGER_ENCRYPTED, false, false, null);
if(eventmanager_enc) eventmanager_pass = PasswordEncrypter.decrypt(eventmanager_pass);
final String eventmanager_pass = readConfPropertyAsString(OPTION_EVENTMANAGER_PASSWORD, null, false, null);
AXIOMXPath path = new AXIOMXPath("//bru1:User");
OMNamespace ns = template.findNamespace(nss, null);
path.addNamespace("bru1", nss);
566,6 → 561,23
private TTItemList getTTItems(String issueid, boolean isTrace) throws MalformedURLException {
long startTime = System.currentTimeMillis();
Sbmappservices72PortType port = null;
//try {
// JCS cache = JCS.getInstance("FileCache");
 
/* -- */
// port = (Sbmappservices72PortType)cache.get(CACHE_SBMPORT);
/*
if(port==null) {
Sbmappservices72 ss = new Sbmappservices72(ClassLoader.getSystemResource("sbmappservices72.wsdl") );
port = ss.getSbmappservices72();
 
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);
}
*/
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(Sbmappservices72PortType.class);
factory.setAddress(endpoint);
573,6 → 585,18
logger.debug("Total execution of sbmappservices72 wsdl read took '"+(System.currentTimeMillis()-startTime)+"' milliseconds.");
// cache.put(CACHE_SBMPORT, port);
// cache.dispose();
// } else {
// logger.debug("sbmappservices72 port was read from cache.");
// }
//} catch (CacheException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// this.exit(1);
//}
if(isTrace) {
Client client = ClientProxy.getClient(port);
client.getInInterceptors().add(new LoggingInInterceptor());
/SVN-ALFEventEmitter/trunk/src/net/brutex/emitter/util/PasswordEncrypter.java
File deleted
Property changes:
Deleted: svn:mime-type
-text/plain
\ No newline at end of property
/SVN-ALFEventEmitter/trunk/src/net/brutex/emitter/util/EmitterUtil.java
57,5 → 57,4
return false;
}
 
}