[cl-soap-devel] a couple of bug fixes

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Sat Sep 10 20:09:01 UTC 2005


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 <lrand48Response> or <mrand48Response>  
> element")))))

I included your code in test/test-basic.lisp - it is a nice one.

Sven




More information about the cl-soap-devel mailing list