Update of /project/cl-soap/cvsroot/cl-soap/test In directory common-lisp.net:/tmp/cvs-serv27824/test
Modified Files: test-google-adwords.lisp test-xsd.lisp Log Message: added a solution to the 'subtype' problem: using a special purpose member called xsi:|type| to indicate a concrete subtype for abstract types
Date: Thu Oct 6 13:09:41 2005 Author: scaekenberghe
Index: cl-soap/test/test-google-adwords.lisp diff -u cl-soap/test/test-google-adwords.lisp:1.13 cl-soap/test/test-google-adwords.lisp:1.14 --- cl-soap/test/test-google-adwords.lisp:1.13 Fri Sep 30 19:12:20 2005 +++ cl-soap/test/test-google-adwords.lisp Thu Oct 6 13:09:40 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: test-google-adwords.lisp,v 1.13 2005/09/30 17:12:20 scaekenberghe Exp $ +;;;; $Id: test-google-adwords.lisp,v 1.14 2005/10/06 11:09:40 scaekenberghe Exp $ ;;;; ;;;; Some tests on the Google AdWords API (not publically available) ;;;; @@ -77,6 +77,8 @@ :input `("getMethodCost" ("service" ,service "method" ,method "date" ,date)) :headers (make-google-headers)))
+#+nil (get-method-cost "InfoService" "getMethodCost") + (defun get-unit-count (&optional (start-date (ut)) (end-date start-date)) (wsdl-soap-call (wsdl-cache-get "https://adwords.google.com:443/api/adwords/v2/InfoService?wsdl") "getUnitCount" @@ -102,6 +104,8 @@ keywords))) :headers (make-google-headers)))
+#+nil (estimate-keyword-list '(("flowers" "Broad" 50000) ("trees" "Broad" 50000))) + (defun get-all-adgroups (campaign-id) (wsdl-soap-call (wsdl-cache-get "https://adwords.google.com:443/api/adwords/v2/AdGroupService?wsdl") "getAllAdGroups"
Index: cl-soap/test/test-xsd.lisp diff -u cl-soap/test/test-xsd.lisp:1.3 cl-soap/test/test-xsd.lisp:1.4 --- cl-soap/test/test-xsd.lisp:1.3 Fri Sep 30 21:57:20 2005 +++ cl-soap/test/test-xsd.lisp Thu Oct 6 13:09:41 2005 @@ -1,6 +1,6 @@ ;;;; -*- mode: lisp -*- ;;;; -;;;; $Id: test-xsd.lisp,v 1.3 2005/09/30 19:57:20 scaekenberghe Exp $ +;;;; $Id: test-xsd.lisp,v 1.4 2005/10/06 11:09:41 scaekenberghe Exp $ ;;;; ;;;; Some (internal) test on the implementatin of the XML Schema Definition ;;;; @@ -139,6 +139,7 @@ '(("flowers" "Broad" 50000) ("tree" "Broad" 100000))))))) (bind-xsd-template template binding + schema *google-adwords-ns*)))
(defun test-2 () @@ -160,5 +161,23 @@ (resolve-xsd-template template (list lxml) *google-adwords-ns*))) + +(defun test-3 () + (let* ((schema (get-xml-schema-definition + (wsdl-cache-get "https://adwords.google.com:443/api/adwords/v2/ReportService?wsdl"))) + (template (generate-xsd-template "scheduleReportJob" schema)) + (binding `("scheduleReportJob" + ("job" + (xsi:|type| "UrlReportJob" + "name" "test123" + "startDate" ,(ut) + "endDate" ,(ut) + "clientAccounts" (100 200) + "adWordsType" "SearchOnly" + "campaigns" (101 201)))))) + (bind-xsd-template template + binding + schema + *google-adwords-ns*)))
;;;; eof