ajax + webservice(wsdl)

http://www.codeproject.com/soap/JavaScriptProxy_01.asp
http://ajaxaspects.blogspot.com/

어떻게 이런 생각을!!
감탄을 금할 수 없습니다.

달삼님이 ECMA스크립용 웹서비스 proxy는 없는가라는 문제제기를 하셨길래
찾아봤더니 이런 기발한 아이디어가 있었군요.

엉성한 webservice.htc는 이제 그만 버리겠습니다.

여러분 프로그래밍도 얼마든지 익사이팅 할 수 있습니다.
아마 익스트림 스포츠가 이런 기분이지 않을까 싶네요.
(워낙 몸치라서 해보진 않았지만)

ps. 혹시 한번에 안되시는 분있으면 연락주세요.
간단한 수정이 필요합니다.
다들 한번에 아시겠지만요....


--------자동생성되는 proxy샘플-----------------------------------------------
// javascript proxy for webservices
// by Matthias Hertel
/* */

proxies.CalcService = {
url: "http://localhost/test/ajaxproxy/CalcService.asmx",
ns: "http://www.mathertel.de/CalcFactors/"
} // proxies.CalcService

/** Say hello to the world. */

proxies.CalcService.HelloWorld = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.HelloWorld.fname = "HelloWorld";
proxies.CalcService.HelloWorld.service = proxies.CalcService;
proxies.CalcService.HelloWorld.action = "http://www.mathertel.de/CalcFactors/HelloWorld";
proxies.CalcService.HelloWorld.params = ["who"];
proxies.CalcService.HelloWorld.rtype = ["HelloWorldResult"];

/** Wast a lot of time, but no cpu. */

proxies.CalcService.SlowWorld = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.SlowWorld.fname = "SlowWorld";
proxies.CalcService.SlowWorld.service = proxies.CalcService;
proxies.CalcService.SlowWorld.action = "http://www.mathertel.de/CalcFactors/SlowWorld";
proxies.CalcService.SlowWorld.params = ["duration:int"];
proxies.CalcService.SlowWorld.rtype = ["SlowWorldResult"];

/** Add 2 numbers. */

proxies.CalcService.AddInteger = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.AddInteger.fname = "AddInteger";
proxies.CalcService.AddInteger.service = proxies.CalcService;
proxies.CalcService.AddInteger.action = "http://www.mathertel.de/CalcFactors/AddInteger";
proxies.CalcService.AddInteger.params = ["number1:int","number2:int"];
proxies.CalcService.AddInteger.rtype = ["AddIntegerResult:int"];

/** Add 2 doubles. */

proxies.CalcService.AddDouble = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.AddDouble.fname = "AddDouble";
proxies.CalcService.AddDouble.service = proxies.CalcService;
proxies.CalcService.AddDouble.action = "http://www.mathertel.de/CalcFactors/AddDouble";
proxies.CalcService.AddDouble.params = ["number1:float","number2:float"];
proxies.CalcService.AddDouble.rtype = ["AddDoubleResult:float"];

/** Calculate all prime factors of a given number. */

proxies.CalcService.CalcPrimeFactors = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.CalcPrimeFactors.fname = "CalcPrimeFactors";
proxies.CalcService.CalcPrimeFactors.service = proxies.CalcService;
proxies.CalcService.CalcPrimeFactors.action = "http://www.mathertel.de/CalcFactors/CalcPrimeFactors";
proxies.CalcService.CalcPrimeFactors.params = ["inputText"];
proxies.CalcService.CalcPrimeFactors.rtype = ["CalcPrimeFactorsResult"];

/** Calculate all prime factors of a given number. */

proxies.CalcService.CalcPrimeFactors2 = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.CalcPrimeFactors2.fname = "CalcPrimeFactors2";
proxies.CalcService.CalcPrimeFactors2.service = proxies.CalcService;
proxies.CalcService.CalcPrimeFactors2.action = "http://www.mathertel.de/CalcFactors/CalcPrimeFactors2";
proxies.CalcService.CalcPrimeFactors2.params = ["number:int"];
proxies.CalcService.CalcPrimeFactors2.rtype = ["CalcPrimeFactors2Result"];

/** Calculate all prime factors of a given number with a slow response.
Use this method if your CPU is too fast. */

proxies.CalcService.SlowCalcPrimeFactors = function () { return(proxies.callSoap(arguments)); }
proxies.CalcService.SlowCalcPrimeFactors.fname = "SlowCalcPrimeFactors";
proxies.CalcService.SlowCalcPrimeFactors.service = proxies.CalcService;
proxies.CalcService.SlowCalcPrimeFactors.action = "http://www.mathertel.de/CalcFactors/SlowCalcPrimeFactors";
proxies.CalcService.SlowCalcPrimeFactors.params = ["inputText"];
proxies.CalcService.SlowCalcPrimeFactors.rtype = ["SlowCalcPrimeFactorsResult"];

by 아나돌루 | 2005/11/22 12:48 | 트랙백 | 덧글(4)

트랙백 주소 : http://borninfree.egloos.com/tb/1954488
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by 달삼 at 2005/11/22 13:36
오~ 서버 사이드 스크립트 기반이라... 좋은 방법이군요... 브라우저 호환성 문제도 없을테고... 여러 개의 웹 서비스를 사용할 때 서버측에 부담이 좀 크지 않을까 걱정이긴 하네요... 하여튼 덕분에 새로운 것을 알았습니다. 감사 ^^
Commented by 아나돌루 at 2005/11/22 19:59
Commented by Robert at 2007/04/06 01:23
nice
Commented by Naomi at 2007/04/06 01:47
hello

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶



_uacct = "UA-319103-1"; urchinTracker();