블로그 이미지
항상웃자 애바른2

카테고리

분류 전체보기 (99)
사진 (4)
비공개 (0)
업무 (1)
자동차 (6)
개발 (23)
가족 (33)
모바일 (13)
Total
Today
Yesterday

달력

« » 2025.12
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

공지사항

최근에 올라온 글

이번 포스트는 Sharepoint 2007의 WSDL을 활용하여 내용을 읽고 쓰는 방법을 소개 해드리겠습니다.
Sharepoint 2010은 Rest API를 지원하기 때문에 wsdl보다는 쉽게 활용이 가능할 것 같습니다.

Tutorial : Sharepoint의 내용 읽기

1. WSDL file 다운로드
Web service WSDL 파일을 다운로드 받기 위해서 현재 사용중인 sharepoint site주소 뒤에 아래와 같이 입력합니다.
브라우저에 나온 WSDL을 PC에 파일로 저장하세요.
1
http://sharepoint.com/_vti_bin/Lists.asmx?WSDL
2. Stub Code Generate

Stub code생성을 위해 console창을 열어 JDK에서 제공하는 wsimport tool을 사용하여 하래와 같이 실행합니다.

1
wsimport -p com.microsoft.sharepoint -keep -extension sharepoint.wsdl

정상적으로 실행이 되었다면 실행한 folder에 stub code가 생성됩니다.

 
3. eclipse project 생성
eclipse 에서 새 프로젝트를 생성하시고, 생성된 stub code를 프로젝트에 import 합니다.

4. Authentication
Sharepoint web service에서 Authentication 방법입니다. 정상적으로 Auth가 되면 ListSoap Object가 리턴됩니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
public static ListsSoap Authentication(String userName, String password) throws Exception {
        ListsSoap port = null;
        if (userName != null && password != null) {
            Lists service = new Lists();
            port = service.getListsSoap();
            ((BindingProvider) port).getRequestContext()
                  .put(BindingProvider.USERNAME_PROPERTY, userName);
            ((BindingProvider) port).getRequestContext()
                  .put(BindingProvider.PASSWORD_PROPERTY, password);
        } else {
            throw new Exception("Fail: Authentication.");
        }
        return port;
    }

여기서 혹시 Authentication failure 등의 에러가 발생한다면, IIS서버 Authentication이 필요합니다.
IIS서버의 Authentication Type이 Basic과 NTLM 두 가지 모두를 지원한다고 하는데 자세한건 패스.
아래 방법은 NTLM Type으로 로그인 하는 방법입니다.

1
2
3
4
5
6
7
8
9
10
public static void NTLMAuth(final String userName, final String password) {
        if (userName != null && password != null) {
            Authenticator.setDefault(new Authenticator() {
                @Override
                protected PasswordAuthentication getPasswordAuthentication() {
                    return new PasswordAuthentication(userName, password.toCharArray());
                }
            });
        }
    }


5. Sharepoint list 읽기

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public static void readSharePointList(ListsSoap port, String listName, ArrayList<string> listColumnNames, String rowLimit) throws Exception {
        if (port != null && listName != null && listColumnNames != null && rowLimit != null) {
            try {
                String viewName = "";
                GetListItems.ViewFields viewFields = null;
                GetListItems.Query query = null;
                GetListItems.QueryOptions queryOptions = null;
                String webID = "";
                 
                GetListItemsResponse.GetListItemsResult result =
                    port.getListItems(listName, viewName, query, viewFields,
                          rowLimit, queryOptions, webID);
                Object listResult = result.getContent().get(0);
                System.out.print(listResult);
            } catch (Exception ex) {
                throw new Exception("Exception :" + ex.toString() + "\n");
            }
        }
    } </string>
port 가 정상적으로 생성되었다면 관련 method들을 찾아서 call 하기만 하면 됩니다. 자세한건 패스^^

6.Test Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public static void main(String[] args) {
        String domain = "Domain\\";
        String userName = "userName";
        String password = "Password";
         
          
        httpService.NTLMAuth(domain+userName, password);
         
        try {
            ArrayList<string> listColumnNames = new ArrayList<string>();
            listColumnNames.add("Title");
            listColumnNames.add("Comments");
             
            ListsSoap port = sharepointService.Authentication(domain+userName, password);
            sharepointService.readSharePointList(port, "Issue Tracking", listColumnNames, "100");
        } catch (Exception e) {
            e.printStackTrace();
        }
    } </string></string>

여기까지 문제 없이 오셨다면 나머지는 혼자서 충분히 하실수 있으리라 생각합니다.


출처: http://xtech.tistory.com/entry/Sharepoint-%EB%82%B4%EC%9A%A9-%EC%9D%BD%EA%B8%B0-with-Java-Tutorial

Posted by 애바른2
, |

java에서 클래스 명, 라인 번호 찍기.


java에서 php의 __FILE__ __LINE__과 유사한 기능을 구현하는 방법!!!



String a = "hahaha";


System.out.println("===========디버깅 시작했다~================");

System.out.print("file:" + (new Throwable()).getStackTrace()[0].getClassName() + "  line");

System.out.println((new Throwable()).getStackTrace()[0].getLineNumber());

System.out.println(a);

System.out.println("===========디버깅 끝났다~================");




eclipse의 경우 템플릿을 지정해놓으면 더 쉽게 할 수 있다.


도구->환경설정->Java->편집기->템플리트


새로작성


이름: dprt

컨텍스트: java

자동삽입에 체크

설명: 디버깅용 프린트

패턴:

//* debugging~~ ${date} ${time}

System.out.println("===========디버깅 시작했다~================");

System.out.println("time:" + new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()));

System.out.print(new Throwable().getStackTrace()[0].getClassName() +"." + new Throwable().getStackTrace()[0].getMethodName() + "()" );

System.out.println("  line: " + new Throwable().getStackTrace()[0].getLineNumber());

System.out.println(${cursor});

System.out.println("===========디버깅 끝났다~================");

// the end of debuuging.. */


요렇게 넣고 확인하면..


java 코드에서 "dprt"라고 치고 ctrl+space 치면 위의 구문들이 찍힌다. 디버깅용으로 굉장히 편하다.


log4j 써도 된다~


출처:http://iilii.egloos.com/2856745

Posted by 애바른2
, |

exiftool 사용법

사진 / 2012. 12. 9. 19:01


exiftool -Orientation -S a.jpg

exiftool -Orientation='Rotate 90 CW' a.jpg -overwrite_original *.jpg

exiftool -Orientation=6 -n a.jpg


-overwrite_original

Posted by 애바른2
, |

ios 5.x 탈옥 관련 팁

모바일 / 2011. 12. 5. 22:13
반탈에서,

http://thebigboss.org/semitether

Mobile Substrate 을 추가하라~~

그러면 편한아게 반탈이용이 가능함^^

즉, 혹여나 리붓되어도 기본부팅은 된다는... 말씀~~ cydia 가 실행안될뿐이지...

기본 어플이나, itunes에서 받은 어플은 실행하는데 문제없음!! 
Posted by 애바른2
, |
* diy 관련사이트 * 








제일카넷 http://www.zeilcar.net / 자동차diy 전문 포탈사이트

손잡이닷컴 http://www.sonjabee.com/ 손잡이나 선반판매 
리빙시티 http://www.livingct.com/ 생활교양코너의 유료홈패션동영상(홈샘님직강) 
삼화 페인트 http://www.djpi.co.kr/ 
쿨칼라 http://coolcolor.co.kr/ 페인트 판매 
굳씽크 http://www.good-think.co.kr/씨트지판매 
반쪽이쩜넷 http://www.banzzogi.net/ 
철천지 http://www.77g.com/ 
페인트클럽 http://www.paintclub.co.kr/ 
theDIY(즐거운diy세상) http://www.thediy.co.kr/ 철물,목재절단판매,3M스프레이판매 
마이드림하우스 http://www.mydreamhouse.co.kr/ 패널벽,리폼,재활용정보와 철망,선반,몰딩판매 
뚝딱이네 http://ddukddak.com/doc/frame2.htm 옷 홈패션 십자수 인형옷강의 
박미영의홈데코 http://my.dreamwiz.com/decohome/mainp.html 홈패션강의 
굿퀼트 http://www.goodquilt.com/frame_main.htm 
퀼트나라 http://www.quiltnala.com/ 
한국공예인협회 http://hdarts.co.kr 퀼트,스텐실 
금성스폰지 http://www.ks-sponge.co.kr/ 스폰지재단하여 판매 
알파문구 http://www.alphastationery.co.kr/ 각종접착제, 문구용품 
한국건축자재협회 http://www.kbmshopping.com 건축자재사이트 
철물백화점 http://www.chulmool.biz 
did벽지 http://www.didwallpaper.com/ 

*원단및 레이스, 부자재 
화이트패브릭 http://www.whitefabric.com/ 
레이스나라 http://www.lacenara.co.kr/ 
천나라닷컴 http://1000nara.com/ 
싸다천 http://ssada1000.com/v2/ 
더싸다 http://www.thessada.com/ 
소잉박스 http://www.sewingbox.net/ 
데코랜드http://my.dreamwiz.com/decohome/mainp.html원단,레이스,태슬,커버링 
천모아 http://www.1000moa.com/ 
슈리본 http://www.sueribbon.co.kr/ 수입리본재료,선물포장재료판매 


*예쁜조명(샹들리에,특이한조명) 있는 사이트* 
데코하우스 http://www.deco-house.co.kr /옥션에서 활동중으로 이번에 오픈 한곳 


*인테리어 소품판매 
화이트홈 http://www.whitehomes.co.kr 
프리티홈 http://www.prettydeco.com/ 
데미스타일 http://www.demistyle.com 
쉬크홈 http://www.chichome.co.kr/ 
바닐라스푼 http://www.vanillaspoon.com/ 
라라데코 http://www.laladeco.com/ 
원룸데코 http://www.oneroomdeco.com/ 독신자타겟 패브릭,소품 
로즈앤핑크 http://www.rosenpink.com/ 인테리어 소품 
앤스홈 http://annshome.co.kr/ 맞춤패브릭 전문 
풍경 http://www.pksopum.com/ 
프로방스 http://www.provence.co.kr/ 프로방스풍 그릇과 가구 
인플로라 http://www.in-flora.co.kr/ 
슈가홈 http://sugarhome.com/ 
포룸 http://www.forroom.com/ 
머쉬룸 http://www.mushroomdeco.co.kr/ 
햄마 http://www.hemma.co.kr/ 이케야제품판매 
핑크데코 http://pinkdeco.co.kr/ 
미세스델러웨이 http://www.mrsdalloway.co.kr/ 
로즈마리 http://www.rosemarihome.com/ 
바인홈http://www.vinehome.co.kr/ 
두산오토 http://www.otto.co.kr/ 
씨씨브랜드 http://www.ccbrand.co.kr/ 
필데코 http://www.feeldeco.com/ 
프롬데코 http://www.fromdeco.com/ 
인플로라 http://www.in-flora.co.kr/ 
포홈 http://www.forhome.co.kr/ 
스위트베리 http://www.sweet-berry.com/index.htm 장식접시와 쿠션등등 
소품채널 http://sofum.co.kr/ 
디피존 http://www.dpzone.co.kr/화이트철재&원목등 상업공간인테리어소품 
인파스텔 http://www.inpastel.co.kr/ 키즈가구,침구,커튼 
소품샵 http://www.sofumshop.co.kr/인테리어소품, 선물샵 
디자인마노 http://www.designmano.co.kr/ 
앤틱하우스 http://www.antichouse.co.kr/ 
아름다운방 http://www.beauty-room.net/ 침구커텐 홈인테리어 
담너머예쁜집 http://www.damzip.com 
제이홈 http://www.jhomes.co.kr/ 
로맨틱홈 http://www.romantic-home.com/ 

*가구관련 
씨리디자인쇼파 http://www.seelee.co.kr 
한샘 http://www.hanssem.com/ 
까사미아 http://www.casamia.co.kr/ 
올리브데코 http://www.olivedeco.co.kr/ 
프란시아 http://www.francia.co.kr/ 
디자인얀 http://www.oyan.co.kr/ 
에프룸 http://www.f-room.com/ (공사중)인테리어코디네이터 최희의 사이트 
디자인앤 http://www.designann.com 
리빙트리 http://www.livingtree.co.kr/ 
대송가구 http://www.daesongmall.com/ 
리빙디자인넷 http://www.livingdesign.net/ 
제니아하우스 http://www.zeniahouse.com/profile/ 

*DIY,맞춤가구 
내가디자인하고내가만드는가구 http://www.my-diy.co.kr/ 
정크가구 http://www.junkstyle.co.kr/ 
상상나무 http://www.interior911.co.kr/ 

*정원용품판매 
쉐르보네 http://www.cherbonheur.com/ 야외 정원용품판매,목재맞춤절단판매 
브라이덜가이드 http://www.bridalguide.co.kr/ 다양한 조화판매 
조은자리 http://www.jounjary.co.kr/ 

*해외인테리어사이트 
로라애슐리 http://www.laura-ashley.com/ 
마샤스튜어트 http://www.marthastewart.com/ 
쉭새크http://chicshack.net/ 
유로데코 http://www.eurodecony.com/ 한인조각가 최린의 조각인테리어소품사이트 

*해외구매대행사이트 
맘앤키즈 http://www.momandkids.co.kr/ 로라애슐리침구나 장식접시, 샤워커튼등 수입대행 
까사까사 http://www.casacasa.co.kr/ 해외 주방용품 

*월간인테리어잡지 
레이디경향 http://www.khan.co.kr/ 
리빙센스 http://livingsense.ismg.co.kr/ 
여성동아 http://women.donga.com/ 
팟찌닷컴 http://www.patzzi.com/ 
까사리빙 http://www.casa.co.kr/home/ 
행복이가득한 집 http://www.design.co.kr/ 
우먼센스 http://womansense.ismg.co.kr/womansense/index.php 

*미싱판매 
썬마트 http://www.sunmart.co.kr/ 
부라더미싱 http://www.brother-shop.co.kr/ 

*대표로드샵 
2001아울렛 www.2001outlet.com
이마트 www.cyberemart.co.kr/ 
홈플러스 www.homeplus.co.kr/
코즈니 www.kosney.co.kr/ 
전망좋은방(룸앤데코) http://www.room-deco.co.kr/ 

*원예사이트 
새싹닷컴 http://saesak.com/식충식물,허브,관엽등에대한 질문답변,판매 
플랜트플러스 http://www.plantplus.co.kr/ 

*기타 데코플라자를 통하면좋은사이트 
노니포유 http://www.noni4u.co.kr/ 직수입 석류,노니관련제품, 건강제품 
웹딱 http://www.webddak.co.kr/ 감각디자인소품 선물용품 

잘 정리된곳
http://myhome.naver.com/cejbaby/menu12.html

소담(릴렉스비슷한거 공구)
http://sodam.odsoft.co.kr

인하우스 지점 안내
http://www.innhaus.co.kr/index.html

수예품+소품파는 곳 (커픈이쁨)
http://www.decotop.com/

레몬스위티(행가집 쥔장 레오가 만든 쇼핑몰)
http://www.lemonsweety.com/

리본묶는 법등 포장법의 모든 것


http://okgift.pe.kr
http://www.forhome.co.kr (다들 아시는 곳이죠..)
http://www.ccbrand.co.kr (자신의 이니셜을 세겨주는 곳이죠...좀 비싸요..)
http://www.thediy.co.kr (각종 DIY제품을 파는곳..MDF나 합판을 잘라서 팔아요..)
http://www.sewingbox.net/index.php (원단파는곳..)
http://www.thessada.com/ (여기도 원단파는 곳...)
http://www.rosecoco.com/ (부산에 오프라인 샾이있죠..그리고 사장님이 남자분이시라는...)
http://www.djpi.co.kr/ (페인트 용품파는곳..)
http://rodam.co.kr/mini.htm (실내정원꾸며주는 곳인데요..비싸니 눈팅만하세요..)
http://www.rosenpink.com/ (아시는분은 다아시는 가격이 비교적 싸더라구요..)
http://www.designmano.co.kr/ (패브릭 소품이 이쁜곳..)
http://www.oneroomdeco.com/ 
(최그에 알게된곳...이쁜게 많터라구요..)
http://www.pksopum.com/default.asp (역시 최근에 알게된곳 인테리어 소품점)
http://www.whitefabric.com/ (이쁜 원단이 많은 곳..)
http://boddary.com/ (원단파는곳..)


Posted by 애바른2
, |