From scaekenberghe at common-lisp.net Mon Sep 5 09:47:06 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 5 Sep 2005 11:47:06 +0200 Subject: [cl-soap-devel] First Message Message-ID: <211495AB-EFD1-4119-974F-6AF521B330EB@common-lisp.net> Hi, This is the first message sent to the CL-SOAP-DEVEL mailing list. Welcome! More information regarding this project can be found on its homepage: http://common-lisp.net/project/cl-soap For now, until further notice, this project is in its startup phase and will not release any code. To access the source code, go through the CVS repository. Sven -- Sven Van Caekenberghe - mailto:sven at beta9.be Beta Nine - software engineering - http://www.beta9.be .Mac - svc at mac.com - http://homepage.mac.com/svc "Lisp isn't a language, it's a building material." - Alan Kay From scaekenberghe at common-lisp.net Mon Sep 5 08:16:39 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 5 Sep 2005 10:16:39 +0200 Subject: [cl-soap-devel] First Message Message-ID: <6A18DB50-A0A7-46AB-8893-403329ABF0A2@common-lisp.net> Hi, This is the first message sent to the CL-SOAP-DEVEL mailing list. Welcome! More information regarding this project can be found on its homepage: http://common-lisp.net/project/cl-soap For now, until further notice, this project is in its startup phase and will not release any code. To access the source code, go through the CVS repository. Sven -- Sven Van Caekenberghe - mailto:sven at beta9.be Beta Nine - software engineering - http://www.beta9.be .Mac - svc at mac.com - http://homepage.mac.com/svc "Lisp isn't a language, it's a building material." - Alan Kay From carlos.ungil at bluewin.ch Wed Sep 7 22:39:02 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Thu, 8 Sep 2005 00:39:02 +0200 Subject: [cl-soap-devel] a couple of bug fixes Message-ID: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> Hello, I've been playing with the code, using openmcl: [ http-client.lisp ] 117a118 > #+openmcl (ccl:make-socket :remote-host host :remote-port port) soap-env and soapenv were used inconsistently: [ namespaces.lisp ] 25c25 < (defparameter *soapenv-ns* (s-xml:register-namespace +soapenv-ns-uri+ "soap-env" :soapenv)) --- > (defparameter *soapenv-ns* (s-xml:register-namespace +soapenv-ns-uri+ "soapenv" :soapenv)) I found also a copy-paste bug [ soap.lisp ] 41c41 < (detail (second (lxml-find-tag :|faultactor| (rest xml))))) --- > (detail (second (lxml-find-tag :|detail| (rest xml))))) and a bug in one of the test functions: [ test-basic.lisp ] 94c94 < (if (eql (lxml-get-tag result) 'ns1:|serviceMethodResponse|) --- > (if (eql (lxml-get-tag result) 'ns1::|serviceMethodResponse|) The following changes are not so obvious, but they are an improvement at least for the particular case I was testing. This requires an extra pair of parentheses sorrunding the body in the examples provided (if I understand correctly the body, and the header, can contain several elements): [ soap.lisp ] 60,62d59 < (defun soap-header (simple-header-alist) < (cons 'soapenv:|Header| simple-header-alist)) < 64,69c61,67 < `((soapenv:|Envelope| < :|xmlns:soapenv| ,+soapenv-ns-uri+ < :|xmlns:xsd| ,+xsd-ns-uri+ < :|xmlns:xsi| ,+xsi-ns-uri+) < , at header < (soapenv:|Body| ,body))) --- > (append `((soapenv:|Envelope| > :|xmlns:soapenv| ,+soapenv-ns-uri+ > soapenv:|encodingStyle| ,+soap-enc-ns-uri+ > :|xmlns:xsd| ,+xsd-ns-uri+ > :|xmlns:xsi| ,+xsi-ns-uri+)) > (when header `((soapenv:|Header| , at header))) > `((soapenv:|Body| , at body)))) By the way, I cannot check out the cl-soap code using the command line ("/project/cl-soap/cvsroot: no such repository"), but the web interface works. Regards, Carlos From carlos.ungil at bluewin.ch Wed Sep 7 23:08:51 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Thu, 8 Sep 2005 01:08:51 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> Message-ID: Hello again, I forgot to mention a problem with s-xml: [ xml.lisp ] 183c183 < (defvar *namespaces* `(("" . *local-namespace*)) --- > (defvar *namespaces* `(("" . ,*local-namespace*)) I don't know if my version is correct, but at least it seems to work (the original code was resulting in an error because it was not possible to apply some method to the *local-namespace* symbol). Carlos From scaekenberghe at common-lisp.net Thu Sep 8 15:45:30 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Thu, 8 Sep 2005 17:45:30 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> Message-ID: Hi Carlos, On 08 Sep 2005, at 00:39, Carlos Ungil wrote: > Hello, > > I've been playing with the code, using openmcl: I was (happily) surprised to find that somebody is already checking out this code! I am still in the process of writing it, it is far from ready (pre- pre alpha). I am even more surprised that you even managed to make some SOAP calls ! > [ http-client.lisp ] > 117a118 > > #+openmcl (ccl:make-socket :remote-host host :remote-port port) > > soap-env and soapenv were used inconsistently: > [ namespaces.lisp ] > 25c25 > < (defparameter *soapenv-ns* (s-xml:register-namespace +soapenv-ns- > uri+ "soap-env" :soapenv)) > --- > > (defparameter *soapenv-ns* (s-xml:register-namespace +soapenv-ns- > uri+ "soapenv" :soapenv)) > > I found also a copy-paste bug > [ soap.lisp ] > 41c41 > < (detail (second (lxml-find-tag :|faultactor| (rest xml))))) > --- > > (detail (second (lxml-find-tag :|detail| (rest xml))))) > > and a bug in one of the test functions: > [ test-basic.lisp ] > 94c94 > < (if (eql (lxml-get-tag result) 'ns1:|serviceMethodResponse|) > --- > > (if (eql (lxml-get-tag result) 'ns1::|serviceMethodResponse|) > > The following changes are not so obvious, but they are an > improvement at least for the particular case I was testing. This > requires an extra pair of parentheses sorrunding the body in the > examples provided (if I understand correctly the body, and the > header, can contain several elements): > > [ soap.lisp ] > 60,62d59 > < (defun soap-header (simple-header-alist) > < (cons 'soapenv:|Header| simple-header-alist)) > < > 64,69c61,67 > < `((soapenv:|Envelope| > < :|xmlns:soapenv| ,+soapenv-ns-uri+ > < :|xmlns:xsd| ,+xsd-ns-uri+ > < :|xmlns:xsi| ,+xsi-ns-uri+) > < , at header > < (soapenv:|Body| ,body))) > --- > > (append `((soapenv:|Envelope| > > :|xmlns:soapenv| ,+soapenv-ns-uri+ > > soapenv:|encodingStyle| ,+soap-enc-ns-uri+ > > :|xmlns:xsd| ,+xsd-ns-uri+ > > :|xmlns:xsi| ,+xsi-ns-uri+)) > > (when header `((soapenv:|Header| , at header))) > > `((soapenv:|Body| , at body)))) > > By the way, I cannot check out the cl-soap code using the command > line ("/project/cl-soap/cvsroot: no such repository"), but the web > interface works. > > Regards, > > Carlos I applied all your changes expect that ones to the envelope. I understand what you are getting at (more or less - but not completely). The soap encoding style is only applicable to rpc style conversations, no ? Could you maybe give an example (and xml wire dump) to show what you mean ? I will look into the regular cvs checkout to see what is wrong there... In any case, thanks for the interest. Sven From carlos.ungil at bluewin.ch Thu Sep 8 22:12:31 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Fri, 9 Sep 2005 00:12:31 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> Message-ID: <8232f3db873bc8ce95cda76f1cb5c179@bluewin.ch> Hello Sven, I was trying to reproduce the following message (generated using the perl module SOAP:Lite): xxxxxx'Short Description' LIKE "Probl%" Using my soap-envelope function, the following code (soap-call end-point '(((:|AuthenticationInfo|) ((:|userName|) "xxx") ((:|password|) "xxx") ((:|authentication|)) ((:|locale|)) ((:|timeZone|)))) `(((ns1::|OpGetList| :|xmlns:ns1| ,ns) ((:|Qualification|) "'Short Description' LIKE \"Prob%\"")))) produces the quite similar xml message xxxxxx'Short Description' LIKE "Prob%" I've just noticed that the perl-generated version contains two properties related to the encoding: - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" (I reproduced this in the lisp version) - xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" (I didn't include that, but it worked the same) I don't know if those are "correct" soap messages, in any case they work. But in fact I've not tried to connect to the web service using the original cl-soap code, it might work as well. Cheers, Carlos From scaekenberghe at common-lisp.net Fri Sep 9 11:29:59 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Fri, 9 Sep 2005 13:29:59 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: <8232f3db873bc8ce95cda76f1cb5c179@bluewin.ch> References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> <8232f3db873bc8ce95cda76f1cb5c179@bluewin.ch> Message-ID: <4C99ACB6-DA2A-4286-995A-D7962C277391@common-lisp.net> Carlos, I now understand better what you were getting at. I committed some changes to allow optional/arbitrary extensions (attributes) to the envelope, header and body elements (apart from the header itself). The next artificial example shows what can be done: CL-SOAP 39 > (soap-call xmethods '((:username "foo") (:password "secret")) `((ns1::|getQuote| soapenv:|encodingStyle| ,+soap-enc-ns-uri+ :|xmlns:ns1| ,ns) ((:|symbol| xsi::|type| "xsd:string") "AAPL")) :soap-action "urn:xmethods-delayed- quotes#getQuote" :envelope-attributes '(:foo "1" :bar "2") :header-attributes '(:foo "1" :bar "2") :body-attributes '(:foo "1" :bar "2")) ;; SOAP CALL sending: foo secret AAPL ;; SOAP CALL receiving: 49.78 ((NS1:|getQuoteResponse| :|xmlns:n| "urn:xmethods-delayed-quotes") ((:|Result| XSI:|type| "xsd:float") "49.78")) I hope that the API now covers what you need (you can add the encodingStyle attribute manually). Is it possible for you to illustrate your points (this one or future ones) using publically available SOAP web services (like the ones listed on xmethods.net), that way we can write test code that everybody can run while being sure we talk about exactly the same things. I didn't just add the attribute you requested because (1) it is not always necessary (for example for non-RPC calls) (2) it can be added on the element inside the body as well (as far as I understand). BTW: how did you find out about this project, I thought it wasn't visible anywhere ? Now I am off to parsing WSDL ;-) Sven On 09 Sep 2005, at 00:12, Carlos Ungil wrote: > Hello Sven, > > I was trying to reproduce the following message (generated using > the perl module SOAP:Lite): > > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> ENV:Header>xxx userName>xxx > ENV:Body> xmlns:namesp1="urn:PRMS_ProblemMgmt_AIS">'Short > Description' LIKE "Probl%" SOAP-ENV:Body> > > Using my soap-envelope function, the following code > > (soap-call end-point > '(((:|AuthenticationInfo|) > ((:|userName|) "xxx") > ((:|password|) "xxx") > ((:|authentication|)) > ((:|locale|)) > ((:|timeZone|)))) > `(((ns1::|OpGetList| :|xmlns:ns1| ,ns) > ((:|Qualification|) "'Short Description' LIKE > \"Prob%\"")))) > > produces the quite similar xml message > > xmlns:xsi="http://www.w3.org/1999/XMLSchema- > instance">xxx userName>xxx > soapenv:Header> xmlns:ns1="urn:PRMS_ProblemMgmt_AIS">'Short > Description' LIKE "Prob%" ns1:OpGetList> > > I've just noticed that the perl-generated version contains two > properties related to the encoding: > - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/ > encoding/" (I reproduced this in the lisp version) > - xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" (I > didn't include that, but it worked the same) > > I don't know if those are "correct" soap messages, in any case they > work. But in fact I've not tried to connect to the web service > using the original cl-soap code, it might work as well. > > Cheers, > > Carlos > > From carlos.ungil at bluewin.ch Fri Sep 9 16:50:24 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Fri, 9 Sep 2005 18:50:24 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: <4C99ACB6-DA2A-4286-995A-D7962C277391@common-lisp.net> References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> <8232f3db873bc8ce95cda76f1cb5c179@bluewin.ch> <4C99ACB6-DA2A-4286-995A-D7962C277391@common-lisp.net> Message-ID: Hello, I found the project looking at http://common-lisp.net/project/?M=D I check that url from time to time to see what's going on. Thanks for adding this extension. In fact it turns out that I can leave out completely the encoding stuff, my web service works fine even if I don't use the optional attributes. The only problem I see is that according to the SOAP specification (if I understood it correctly when I took a look a few days ago) it's possible to have several elements in the body; I don't think such a message can be created using cl-soap. Not that I need that at all, but it might be an issue in the future. Cheers, Carlos PS: I've been experimenting as well with a public web service: ;;http://www.random.org/soap.html ;;http://www.random.org/RandomDotOrg.wsdl ;;http://www.random.org/clients/soap/ (defun get-random-number (&keyword unsigned) "returns a true random number in the interval [2^31, 2^31) or [0, 2^31)" (let ((ns "urn:RandomDotOrg")) (s-xml:register-namespace ns "ns1" :ns1) (let* ((rng (make-soap-end-point "http://www.random.org/cgi-bin/Random.cgi")) (result (soap-call rng nil (if unsigned `((ns1::|lrand48| :|xmlns:ns1| ,ns)) `((ns1::|mrand48| :|xmlns:ns1| ,ns)))))) (if (or (eql (lxml-get-tag result) 'ns1::|lrand48Response|) (eql (lxml-get-tag result) 'ns1::|mrand48Response|)) (values (parse-integer (second (second result)))) (error "Expected a or element"))))) > Carlos, > > I now understand better what you were getting at. > I committed some changes to allow optional/arbitrary extensions > (attributes) to the envelope, header and body elements (apart from the > header itself). The next artificial example shows what can be done: > > CL-SOAP 39 > (soap-call xmethods > '((:username "foo") (:password "secret")) > `((ns1::|getQuote| > soapenv:|encodingStyle| ,+soap-enc-ns-uri+ > :|xmlns:ns1| ,ns) > ((:|symbol| xsi::|type| "xsd:string") > "AAPL")) > :soap-action > "urn:xmethods-delayed-quotes#getQuote" > :envelope-attributes '(:foo "1" :bar "2") > :header-attributes '(:foo "1" :bar "2") > :body-attributes '(:foo "1" :bar "2")) > ;; SOAP CALL sending: > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/1999/XMLSchema" > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" FOO="1" BAR="2"> > > foo > secret > > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:ns1="urn:xmethods-delayed-quotes"> > AAPL > > > > ;; SOAP CALL receiving: > xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' > xmlns:xsd='http://www.w3.org/1999/XMLSchema' > xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' > soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> Body> xsi:type='xsd:float'>49.78 soap:Envelope> > ((NS1:|getQuoteResponse| :|xmlns:n| "urn:xmethods-delayed-quotes") > ((:|Result| XSI:|type| "xsd:float") "49.78")) > > I hope that the API now covers what you need (you can add the > encodingStyle attribute manually). > > Is it possible for you to illustrate your points (this one or future > ones) using publically available SOAP web services (like the ones > listed on xmethods.net), that way we can write test code that > everybody can run while being sure we talk about exactly the same > things. > > I didn't just add the attribute you requested because (1) it is not > always necessary (for example for non-RPC calls) (2) it can be added > on the element inside the body as well (as far as I understand). > > BTW: how did you find out about this project, I thought it wasn't > visible anywhere ? > > Now I am off to parsing WSDL ;-) > > Sven > > On 09 Sep 2005, at 00:12, Carlos Ungil wrote: > >> Hello Sven, >> >> I was trying to reproduce the following message (generated using the >> perl module SOAP:Lite): >> >> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/1999/XMLSchema" >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/ >> encoding/">xxx> userName>xxx> >> OpGetList >> xmlns:namesp1="urn:PRMS_ProblemMgmt_AIS">'Short >> Description' LIKE >> "Probl%"> ENV:Envelope> >> >> Using my soap-envelope function, the following code >> >> (soap-call end-point >> '(((:|AuthenticationInfo|) >> ((:|userName|) "xxx") >> ((:|password|) "xxx") >> ((:|authentication|)) >> ((:|locale|)) >> ((:|timeZone|)))) >> `(((ns1::|OpGetList| :|xmlns:ns1| ,ns) >> ((:|Qualification|) "'Short Description' LIKE >> \"Prob%\"")))) >> >> produces the quite similar xml message >> >> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:xsd="http://www.w3.org/1999/XMLSchema" >> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">> Header>xxxxxx> password>> soapenv:Header>> xmlns:ns1="urn:PRMS_ProblemMgmt_AIS">'Short >> Description' LIKE >> "Prob%"> soapenv:Envelope> >> >> I've just noticed that the perl-generated version contains two >> properties related to the encoding: >> - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> (I reproduced this in the lisp version) >> - xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" (I >> didn't include that, but it worked the same) >> >> I don't know if those are "correct" soap messages, in any case they >> work. But in fact I've not tried to connect to the web service using >> the original cl-soap code, it might work as well. >> >> Cheers, >> >> Carlos >> >> > From sven at beta9.be Fri Sep 9 19:29:31 2005 From: sven at beta9.be (Sven Van Caekenberghe) Date: Fri, 9 Sep 2005 21:29:31 +0200 Subject: [cl-soap-devel] Public CVS Access Message-ID: <6F5EA6EC-ADC2-4EAC-8682-B207CC664384@beta9.be> Public CVS Access to CL-SOAP has been fixed: To get the code through CVS: $ cvs -d:pserver:anonymous at common-lisp.net:/project/cl-soap/cvsroot login Logging in to :pserver:anonymous at common-lisp.net:2401/project/cl-soap/ cvsroot CVS password: $ cvs -d:pserver:anonymous at common-lisp.net:/project/cl-soap/cvsroot co cl-soap cvs server: Updating cl-soap Specifiy 'anonymous' as password. Afterwards, keep up to date by issuing $cvs update in the cl-soap directory. Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2355 bytes Desc: not available URL: From scaekenberghe at common-lisp.net Sat Sep 10 20:09:01 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Sat, 10 Sep 2005 22:09:01 +0200 Subject: [cl-soap-devel] a couple of bug fixes In-Reply-To: References: <96f8f1a40cda10b50a3b0088e7ca1c00@bluewin.ch> <8232f3db873bc8ce95cda76f1cb5c179@bluewin.ch> <4C99ACB6-DA2A-4286-995A-D7962C277391@common-lisp.net> Message-ID: On 09 Sep 2005, at 18:50, Carlos Ungil wrote: > I found the project looking at http://common-lisp.net/project/?M=D > I check that url from time to time to see what's going on. Interesting! Didn't known that one. > Thanks for adding this extension. In fact it turns out that I can > leave out completely the encoding stuff, my web service works fine > even if I don't use the optional attributes. I expected something like that. > The only problem I see is that according to the SOAP specification > (if I understood it correctly when I took a look a few days ago) > it's possible to have several elements in the body; I don't think > such a message can be created using cl-soap. Not that I need that > at all, but it might be an issue in the future. You're right, I was aware of that, I added a comment to that effect. I don't think multiple elements in a body are used much. > Cheers, > > Carlos > > PS: I've been experimenting as well with a public web service: > > ;;http://www.random.org/soap.html > ;;http://www.random.org/RandomDotOrg.wsdl > ;;http://www.random.org/clients/soap/ > (defun get-random-number (&keyword unsigned) > "returns a true random number in the interval [2^31, 2^31) or > [0, 2^31)" > (let ((ns "urn:RandomDotOrg")) > (s-xml:register-namespace ns "ns1" :ns1) > (let* ((rng (make-soap-end-point "http://www.random.org/cgi-bin/ > Random.cgi")) > (result (soap-call rng > nil > (if unsigned > `((ns1::|lrand48| :|xmlns:ns1| ,ns)) > `((ns1::|mrand48| :|xmlns:ns1| ,ns)))))) > (if (or (eql (lxml-get-tag result) 'ns1::|lrand48Response|) > (eql (lxml-get-tag result) 'ns1::|mrand48Response|)) > (values (parse-integer (second (second result)))) > (error "Expected a or > element"))))) I included your code in test/test-basic.lisp - it is a nice one. Sven From carlos.ungil at bluewin.ch Tue Sep 13 19:11:19 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Tue, 13 Sep 2005 21:11:19 +0200 Subject: [cl-soap-devel] problem with CMUCL (redefining close) Message-ID: <38f304c73600c47dfc2caaf6384f5115@bluewin.ch> Hello, when loading src/http-client: CLOSE already names an ordinary function or a macro. If you want to replace it with a generic function, you should remove the existing definition beforehand. Regards, Carlos From scaekenberghe at common-lisp.net Tue Sep 13 21:08:35 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Tue, 13 Sep 2005 23:08:35 +0200 Subject: [cl-soap-devel] problem with CMUCL (redefining close) In-Reply-To: <38f304c73600c47dfc2caaf6384f5115@bluewin.ch> References: <38f304c73600c47dfc2caaf6384f5115@bluewin.ch> Message-ID: On 13 Sep 2005, at 21:11, Carlos Ungil wrote: > Hello, > > when loading src/http-client: > > CLOSE already names an ordinary function or a macro. > If you want to replace it with a generic function, you should > remove the existing definition beforehand. Yes, officially, #'cl:close is a function, not a generic function. In LispWorks, it *is* a generic function, with methods for various usages. That is why I tend to use it. It is a continuable error in OpenMCL, isn't it ? Maybe we could add some #+openmcl code to handle this case ? BTW, I started adding some WSDL support, although it is far from finished, you might be interested. > Regards, > > Carlos Sven From carlos.ungil at bluewin.ch Tue Sep 13 22:23:30 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Wed, 14 Sep 2005 00:23:30 +0200 Subject: [cl-soap-devel] problem with CMUCL (redefining close) In-Reply-To: References: <38f304c73600c47dfc2caaf6384f5115@bluewin.ch> Message-ID: <3935f64a04df02d7e97e936274c8d7ae@bluewin.ch> Hello Sven, the problem is in CMUCL (OpenMCL works fine). The error is continuable, but 0: [CONTINUE] Discard the existing definition of CLOSE. doesn't seem to be a good idea! And in fact it's a terrible idea. I've just tried and it got into a loop: Error flushed ...Error in "": the function CLOSE is undefined. I've not tried the WSDL parser yet, but I've tested other lisp implementations. Apart from the problem with CMUCL, there were successful tests as well: SBCL and clisp work (at least a simple SOAP call returns the correct result). I've used the following code for open-socket-stream: #+clisp (socket:socket-connect port host) #+cmu (sys:make-fd-stream (ext:connect-to-inet-socket host port) :input t :output t :buffering :none) #+sbcl (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) (sb-bsd-sockets:socket-connect socket (car (sb-bsd-sockets:host-ent-addresses (sb-bsd-sockets:get-host-by-name host))) port) (sb-bsd-sockets:socket-make-stream socket :element-type 'character :input t :output t :buffering :none)) This is adapted from s-xml-rpc/src/sysdeps.lisp; I'm not sure my version is bug-free but it at least is partly correct as it seems to work. Carlos On Sep 13, 2005, at 11:08 PM, Sven Van Caekenberghe wrote: > > On 13 Sep 2005, at 21:11, Carlos Ungil wrote: > >> Hello, >> >> when loading src/http-client: >> >> CLOSE already names an ordinary function or a macro. >> If you want to replace it with a generic function, you should remove >> the existing definition beforehand. > > Yes, officially, #'cl:close is a function, not a generic function. > In LispWorks, it *is* a generic function, with methods for various > usages. > That is why I tend to use it. > > It is a continuable error in OpenMCL, isn't it ? > > Maybe we could add some #+openmcl code to handle this case ? > > BTW, I started adding some WSDL support, although it is far from > finished, > you might be interested. > >> Regards, >> >> Carlos > > Sven > From scaekenberghe at common-lisp.net Thu Sep 15 14:03:41 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Thu, 15 Sep 2005 16:03:41 +0200 Subject: [cl-soap-devel] Status Update Message-ID: <9AEAACC7-1623-4638-8D8C-B75ABCF458C8@common-lisp.net> The project main web page http://common-lisp.net/project/cl-soap was updated today with - installation instructions - a status section - some example code There is now HTTPS support in do-http-request (http-client.lisp) for LispWorks. I am now focusing on handling WSDL types definitions using XML schema definitions. Sven From scaekenberghe at common-lisp.net Wed Sep 21 19:17:13 2005 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Wed, 21 Sep 2005 21:17:13 +0200 Subject: [cl-soap-devel] Status Update Message-ID: I checked in a lot of code today. The code added, implements wsdl-soap-call for soap document mode (as opposed to rpc mode), as well as using an XML Schema Definition (XSD) schema as the contents of a wsdl types element. Automatic input, header and output binding to support this was also added, as well as much more XSD support (primitives, elements, simple & complex types and sequences). The main use-case for this is the google adwords api, which is only accessible if you (1) have a google adwords (advertising) account, (2) have a Client Contrtol Center access and (3) a API token. Most of this is free, only the adwords account cost you $5. Please also update S-XML to the latest cvs HEAD. Sven From Alain.Picard at memetrics.com Thu Sep 29 04:01:40 2005 From: Alain.Picard at memetrics.com (Alain.Picard at memetrics.com) Date: Thu, 29 Sep 2005 14:01:40 +1000 Subject: [cl-soap-devel] API and Usability in CL-SOAP Message-ID: Dear Sven, I've been playing with CL-SOAP, and thinking about what I'm going to have to layer on top of it to integrate it in my app. I'm not sure I'm completely happy with what cl-soap currently provides, so let me know if you think my expectations are unrealistic. :-) My only previous experience with SOAP is a quick project I did using Perl. There, the metaphor seemed to be something like this: my $svc = make_creative_service(); # don't worry how this happens... ... $svc->activateCreative($creative->{adGroupId}, $creative->{id}, @authorization); In this usage pattern, which I very much like, the service object ends up looking like a native object which supports the methods described in the WSDL. Likewise, the "objects" returned by various functions all have defined accessor and setter methods (primarily because they are really just perl hash table references, so you can do things like $adGroup_ref->{maxCpc} = 700000; ... use $adGroup_ref later in some SOAP call as an argument OK, Now in CL-SOAP, the results of various calls ends up being flat lists; thus CL-SOAP> (get-ad-group :ad-group-id my-adgroup-id) ==> ("getAdGroupResponse" ("getAdGroupReturn" ("maxCpc" 10000 "name" "cl-soap test 3" "id" 213203775 "campaignId" 3871365 "status" "Enabled"))) Wouldn't be nice to instead obtain something that looked like #<|Google:AdGroup| 225A19CC> ? And to be able to do things like (setf (max-cpc my-adgroup) 700000) ? (or even (setf (maxCpc my-adgroup) 700000), at the cost of working in a case sensitive reader environment) And, most especially, to be able to do things like (update-adgroup *adgroup-service* my-adgroup) ? I guess that that's the sort of deep integration I was _really_ hoping for. So 1) am I dreaming? 2) do you agree this would be good? 3) do you consider this out of scope? 4) do you think we'd want to do this? Lemme know your thougts. To any other list lurkers, please contribute your opinions as well, if you have any. cheers, --Alain Picard