Skip to content

Instantly share code, notes, and snippets.

View yamanyar's full-sized avatar

Kaan Yamanyar yamanyar

View GitHub Profile
@yamanyar
yamanyar / ornek.xml
Created April 2, 2012 07:35
Dışarıdaki bir WS'e giden
<int:channel id="clientService"/>
<chain input-channel="clientService">
<!-- kullanacağımız servis soap-action isteseydi; burada yer alacaktı.
<ws:header-enricher>
<ws:soap-action value=""/>
</ws:header-enricher>-->
<ws:outbound-gateway uri="http://mygreatserver.yamanyar.com:9082/services/GreatService" />
</chain>
@yamanyar
yamanyar / ornek2.xml
Created April 2, 2012 07:41
Logging Eklenmiş Hali
<int:channel id="clientService">
<int:interceptors>
<int:wire-tap channel="loggingChannel"/>
</int:interceptors>
</int:channel>
<int:logging-channel-adapter id="loggingChannel" level="INFO"
expression="'Message received : '.concat(payload.toString())"/>
<chain input-channel="clientService">
@yamanyar
yamanyar / ornek3.xml
Created April 2, 2012 07:52
Transformer Eklenmiş Hali
<int:channel id="clientService">
<int:interceptors>
<int:wire-tap channel="xmlLoggingChannel"/>
</int:interceptors>
</int:channel>
<int:channel id="xmlLoggingChannel"/>
<int:transformer input-channel="xmlLoggingChannel" output-channel="loggingChannel">
<beans:bean class="com.yamanyar.si.transformers.DomSourceToStringNoErrorTransformer"/>
package com.yamanyar.si.transformers.DomSourceToStringNoErrorTransformer;
import org.apache.log4j.Logger;
import org.springframework.integration.Message;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.transformer.Transformer;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
@yamanyar
yamanyar / logging.xml
Created April 3, 2012 12:25
Spring WS Logging Req/Res
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:ws="http://www.springframework.org/schema/integration/ws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/ws
http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">
<ws:interceptors>
@yamanyar
yamanyar / log4j.xml
Created April 3, 2012 12:35
Sample properties file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m%n"/>
</layout>
@yamanyar
yamanyar / tempale.html
Created April 5, 2012 14:13
JS Template
<b>Hello</b> {name}! You have {count} new messages.
{
"name": "Mick",
"count": 30
}
@yamanyar
yamanyar / win.bat
Created April 7, 2012 05:05
netrc settings on windows
Kaan@YamanyarWin /d/codes/moshi (master)
$ git remote -v
origin https://[email protected]/yamanyar/moshi.git (fetch)
origin https://[email protected]/yamanyar/moshi.git (push)
Kaan@YamanyarWin /d/codes/moshi (master)
$ git remote set-url origin https://bitbucket.org/yamanyar/moshi.git
Kaan@YamanyarWin /d/codes/moshi (master)
$ cat ~/_netrc
@yamanyar
yamanyar / sample.py
Created April 7, 2012 05:07
resolving in python
#!/usr/bin/python
# Rewrite URL Script for Secure Web Issue
# author: Kaan Yamanyar
from Crypto.Cipher import DES
from datetime import datetime, timedelta
import sys
import re
import base64
def parseToken(str):