Subversion Repositories XServices

Rev

Rev 198 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 198 Rev 199
Line 28... Line 28...
28
 
28
 
29
import javax.activation.DataHandler;
29
import javax.activation.DataHandler;
30
import javax.jws.WebParam;
30
import javax.jws.WebParam;
Line -... Line 31...
-
 
31
import javax.jws.WebService;
31
import javax.jws.WebService;
32
 
32
 
33
import lombok.extern.slf4j.Slf4j;
33
import org.apache.commons.configuration2.ex.ConfigurationException;
34
import org.apache.commons.configuration2.ex.ConfigurationException;
34
import org.apache.commons.configuration2.PropertiesConfiguration;
35
import org.apache.commons.configuration2.PropertiesConfiguration;
35
import org.apache.commons.jcs.JCS;
-
 
36
import org.apache.commons.jcs.access.exception.CacheException;
-
 
-
 
36
import org.apache.commons.jcs.JCS;
Line 37... Line 37...
37
import org.apache.logging.log4j.LogManager;
37
import org.apache.commons.jcs.access.exception.CacheException;
38
import org.apache.logging.log4j.Logger;
38
 
39
 
39
 
40
import net.brutex.DocBuilder.DocBuilder;
40
import net.brutex.DocBuilder.DocBuilder;
Line 58... Line 58...
58
 
58
 
59
/**
59
/**
60
 * @author Brian Rosenberger
60
 * @author Brian Rosenberger
61
 * 
61
 * 
-
 
62
 */
62
 */
63
@Slf4j
63
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, endpointInterface = "net.brutex.xservices.ws.OpenAirProxyService", serviceName = OpenAirProxyService.SERVICE_NAME)
64
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, endpointInterface = "net.brutex.xservices.ws.OpenAirProxyService", serviceName = OpenAirProxyService.SERVICE_NAME)
Line 64... Line -...
64
public class OpenAirProxyServiceImpl implements OpenAirProxyService {
-
 
65
 
-
 
66
	/*
-
 
67
	 * Log4j2 Set Up
-
 
Line 68... Line 65...
68
	 */
65
public class OpenAirProxyServiceImpl implements OpenAirProxyService {
69
	private final Logger logger = LogManager.getLogger(OpenAirProxyServiceImpl.class);
66
 
70
 
67
 
71
	/*
68
	/*
Line 460... Line 457...
460
		 * get details from configuration file
457
		 * get details from configuration file
461
		 */
458
		 */
462
		final PropertiesConfiguration props;
459
		final PropertiesConfiguration props;
463
		try {
460
		try {
464
			final String config = "../openair.properties";
461
			final String config = "../openair.properties";
465
			logger.debug("Loading Open Air connection details from " + this.getClass().getClassLoader().getResource("/")
462
			log.debug("Loading Open Air connection details from " + this.getClass().getClassLoader().getResource("/")
466
					+ config);
463
					+ config);
Line 467... Line 464...
467
 
464
 
Line 468... Line 465...
468
			final URL configloc = this.getClass().getClassLoader().getResource(config);
465
			final URL configloc = this.getClass().getClassLoader().getResource(config);
Line 477... Line 474...
477
 
474
 
Line 478... Line 475...
478
			final OpenAirRestConnection con;
475
			final OpenAirRestConnection con;
479
 
476
 
480
			con = new OpenAirRestConnection(JCS.getInstance("OACache"), company, user, password);
-
 
481
			return con;
-
 
482
		} catch (CacheException e) {
-
 
483
			logger.error(e);
477
			con = new OpenAirRestConnection(JCS.getInstance("OACache"), company, user, password);
484
			e.printStackTrace();
-
 
485
		} catch (ConfigurationException e) {
-
 
486
			logger.error(e);
-
 
487
			e.printStackTrace();
478
			return con;
488
		} catch (IOException e) {
479
		} catch (CacheException | ConfigurationException | IOException e) {
489
			logger.error(e);
480
			log.error(e.getMessage());
Line 490... Line 481...
490
			e.printStackTrace();
481
			e.printStackTrace();
491
		} finally {
482
		} finally {