This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP PROCEDURE IF EXISTS FillNotificationPoolByMessage_r1; | |
| DELIMITER // | |
| CREATE PROCEDURE FillNotificationPoolByMessage_r1 (IN p_message_id INT) | |
| BEGIN | |
| DECLARE v_dlg_id serial; | |
| DECLARE done INT DEFAULT FALSE; | |
| DECLARE curs CURSOR FOR SELECT dlg_id FROM devices_lg WHERE status = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ru.cti.gosuslugi.roadpolice.web.contrllers; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.TypeMismatchException; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.security.core.Authentication; | |
| import org.springframework.security.core.context.SecurityContextHolder; | |
| import org.springframework.stereotype.Controller; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RequestMapping( | |
| value = "/read/{userId}/{category}", | |
| method = RequestMethod.GET, | |
| produces = "application/json") | |
| @Async(value = "threadPoolTaskExecutor") | |
| public @ResponseBody Callable<Object> getStorageValues(@PathVariable final String userId, @PathVariable final String category) { | |
| return new Callable<Object>() { | |
| @Override | |
| public Object call() throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private String sendSOAPMessageNative(String message, String targetURL, String soapAction) { | |
| HttpURLConnection connection = null; | |
| try { | |
| //Create connection | |
| URL url = new URL(targetURL); | |
| connection = (HttpURLConnection) url.openConnection(); | |
| connection.setRequestMethod("POST"); | |
| connection.setRequestProperty("Content-Type", "text/xml"); | |
| connection.setRequestProperty("charset", "UTF-8"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2013-08-08 11:45:32,184 INFO qtp207857839-20 ru.cti.bwksapi.client.BroadworksClient - | |
| Start comunication VPBX to BWKS with operationId: 234 | |
| 2013-08-08 11:45:32,185 INFO qtp207857839-20 ru.cti.bwksapi.client.BroadworksClient - Request from VPBX to BWKS: | |
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:BroadsoftDocument xmlns:ns2="C" protocol="OCI"><sessionId>42a61b73-7e20-40a3-bb0d-c2f2b209f399</sessionId><command xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthenticationRequest"><userId>research</userId></command></ns2:BroadsoftDocument> (operationId=234) | |
| 2013-08-08 11:45:39,371 INFO qtp207857839-22 ru.cti.bwksapi.client.BroadworksClient - Responce from BWKS to VPBX: | |
| (operationId=234) | |
| 2013-08-08 11:45:39,375 ERROR qtp207857839-22 ru.cti.bwksapi.client.BroadworksClient - Wrong response from Broadworks service! Details:<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create table version ( | |
| version integer, | |
| last_updated timestamp | |
| ); | |
| insert into version (version, last_updated) values (1, now()); | |
| # Добавление нового скрипта: | |
| # Имя скрипта: XXX_script_name.sql | |
| # В конец добавить: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ProductServiceImpl implements ProductService { | |
| private TransactionTemplate transactionTemplate; | |
| private ProductDao productDao; | |
| public void setTransactionManager(PlatformTransactionManager transactionManager) { | |
| this.transactionTemplate = new TransactionTemplate(transactionManager); | |
| } | |
| public void setProductDao(ProductDao productDao) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <beans> | |
| <bean id="myTxManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> | |
| <property name="sessionFactory" ref="mySessionFactory"/> | |
| </bean> | |
| <bean id="myProductService" class="product.ProductServiceImpl"> | |
| <property name="transactionManager" ref="myTxManager"/> | |
| <property name="productDao" ref="myProductDao"/> | |
| </bean> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String hmacSha1(String value, String key) { | |
| try { | |
| // Get an hmac_sha1 key from the raw key bytes | |
| byte[] keyBytes = key.getBytes(); | |
| SecretKeySpec signingKey = new SecretKeySpec(keyBytes, "HmacSHA1"); | |
| // Get an hmac_sha1 Mac instance and initialize with the signing key | |
| Mac mac = Mac.getInstance("HmacSHA1"); | |
| mac.init(signingKey); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://schemas.bssys.com/spg/merchant/service/messages/v1" xmlns:v11="http://schemas.bssys.com/spg/service/payment/details/v1" xmlns:xd="http://www.w3.org/2000/09/xmldsig#"> | |
| <soapenv:Header/> | |
| <soapenv:Body> | |
| <v1:registerPaymentRequest> | |
| <requestHeader requestUUID="25fe07f1-b0c7-30e5-a579-000100146487"> | |
| <createDateTime>2013-01-29T12:39:38+04:00</createDateTime> | |
| <sender> | |
| <id>TESTPORTAL</id> | |
| </sender> | |
| <recipient> |