From scaekenberghe at common-lisp.net Mon Aug 14 19:35:32 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 14 Aug 2006 21:35:32 +0200 Subject: [cl-sockets-devel] Re: cl-soap In-Reply-To: References: Message-ID: On 07 Aug 2006, at 08:13, Terence Lee wrote: > I am playing with cl-soap with the attached wsdl, and in the end I > got it to work, but needed to make the following adjustments, you > should see the diff in the code lxml.lisp and xsd.lisp > > 1) changed string_equal to string= in lxml.lisp > > (defun find-item-named (item-name sequence) > (find (actual-name item-name) sequence :test #'string= :key #'get- > name)) > > I found that element names can be case-sensitive atleast with this > example > > 2) added Ref optional attributed to class xml-schema-element > > Ref points to another element > > And in the generate-xsd-template, I've added ref so that it > overrides element name if it doesn't exist. It should override > other things too. > > 3) modified generate-xsd-template, so that if element is empty, skip > > 4) originally the wsdl didn't work, due to wsdl targetnamespace is > different from schema's. But I changed the wsdl targetnamespace as > a workaround. It seems schema can define it's only targetnamespace. > > Regards > Terence Lee > > > > Terence, Sorry for the somewhat late reply: I have been quite busy. I also will not immediately have time to look at your patches: I am going on a holiday until the end of the month. It is however quite interesting that you got cl-soap to work for your situation and I already want to thank you for your contributions. What exactly did you use cl-soap for ? Is it a public service or standard ? What are the platform details ? Sven From alexander.kjeldaas at gmail.com Mon Aug 21 01:18:24 2006 From: alexander.kjeldaas at gmail.com (Alexander Kjeldaas) Date: Mon, 21 Aug 2006 03:18:24 +0200 Subject: [cl-sockets-devel] Some additions to cl-soap Message-ID: Hi, I'm using cl-soap for a project and have added a few features I needed: xsd: o Handling annotation nodes (basically ignoring them when needed). o Handling attributes o Handling simple-content. o Handling any-attribute (not handled by template/binding logic). o Handling default/fixed values. o Handling ref attributes (basically similar to the type attribute on elements). templates: o Attributes are represented by having the element name be a list. (1 "foo" :INTEGER) vs (1 ("foo" (? "attr1" :INTEGER)) :INTEGER) o Default/fixed values are represented by overloading the multiplicity (1 ("foo" ("342" "attr1" :INTEGER)) :INTEGER) [multiplicity different from 1 makes no sense when a default value is given]. binding: o Attribute bindings are represented as in lxml. Supporting attributes means having to do a few changes. For example, we can have a complexType which is really a primitive type but with a few attributes. Example: Thus when looking for the content-type (the third element in the template-triple), we need to try to resolve a bit harder than what we otherwise do. So you can now resolve the type of an element, but also the content-type. The latter will resolve through the complexType example above. misc other changes: o https support using cl+ssl for sbcl (new dependency). o use defparameter instead of defconstant (SBCL complains). ... Sven, I know you are on vacation so I've put up a darcs repository at http://www.pvv.org/~astor/cl-soap/ if anyone wants to have a look at the patches. Thanks, Alexander