From csr21 at cantab.net Wed Oct 24 10:07:39 2007 From: csr21 at cantab.net (Christophe Rhodes) Date: Wed, 24 Oct 2007 11:07:39 +0100 Subject: [cl-sockets-devel] wsdl parsing Message-ID: <87bqamngzu.fsf@cantab.net> Hi, Please forgive the naivety of this; I am a newcomer to the world of soap, and I don't really understand what I'm doing, or which tool is the likely cause of the problems I'm having. I have a SOAP server, built using gsoap, which automatically generates the attached .wsdl file; and I can successfully use cl-soap to call it by hand as follows: --- Begin REPL transcript --- (let ((ns "http://tempuri.org/adb.xsd")) (s-xml:register-namespace ns "adb" :adb) (let ((xmethods (make-soap-end-point "http://gibbons.doc.gold.ac.uk:20703"))) (soap-call xmethods nil `((adb::|status| :|xmlns:adb| ,ns) (:|dbName| "/tmp/foodb"))))) ;; SOAP CALL sending: /tmp/foodb ;; SOAP CALL receiving: 000000 (|adb|:|statusResponse| (:|result| (:|numFiles| "0") (:|dim| "0") (:|length| "0") (:|dudCount| "0") (:|nullCount| "0") (:|flags| "0"))) --- End REPL transcript --- However, attempting to call the service using the wsdl parser does not work, I think because of namespace problems: --- Begin REPL transcript --- (wsdl-soap-call "http://omras2.doc.gold.ac.uk/adb.wsdl" "status" :input `("status" ("dbName" "/tmp/foodb"))) ;; SOAP CALL sending: /tmp/foodb ;; SOAP CALL receiving: SOAP-ENV:ClientMethod 'status' not implemented: method name or namespace not recognized --- End REPL transcript --- So I guess my question is: is my wsdl malformed, or is there some deficiency in cl-soap's wsdl parser? If the latter, how can I go about fixing it? (As I say, I'm afraid I know very little about the underlying SOAP technology, so please be as explicit as you have patience for...) Thanks, Christophe -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: adb.wsdl URL: From haus+cl-soap at mail.math.uni-magdeburg.de Fri Oct 26 17:20:21 2007 From: haus+cl-soap at mail.math.uni-magdeburg.de (Utz-Uwe Haus) Date: Fri, 26 Oct 2007 19:20:21 +0200 Subject: [cl-sockets-devel] wsdl parsing In-Reply-To: <87bqamngzu.fsf@cantab.net> References: <87bqamngzu.fsf@cantab.net> Message-ID: <20071026172021.GZ19924@merkur.math.uni-magdeburg.de> Hi everybody, On Wed, Oct 24, 2007 at 11:07:39AM +0100, Christophe Rhodes wrote: > I have a SOAP server, built using gsoap, which automatically generates > the attached .wsdl file; and I can successfully use cl-soap to call it > by hand as follows: [dd] > vs. > seems the culprit. I guess that is due to the basically nonexistant support of mixing namespaces in cl-soap. I had started to fix this in the beginning of this year, but since that was supposed to be sugar on top of another project which has been delayed in its main part, this is not finished. If you care, please look at my patched version at If that helps you any, please let me know, since it may convince me to clean things up to get things merged. Utz -- Utz-Uwe Haus haus at mail.math.uni-magdeburg.de Inst. f. Mathemat. Optim. utz at uuhaus.de Uni Magdeburg PGP keys 1024/6AD23BE1 and 2048/5D0B72A1 GERMANY available via keyservers or email request From csr21 at cantab.net Mon Oct 29 18:08:57 2007 From: csr21 at cantab.net (Christophe Rhodes) Date: Mon, 29 Oct 2007 18:08:57 +0000 Subject: [cl-sockets-devel] wsdl parsing In-Reply-To: <20071026172021.GZ19924@merkur.math.uni-magdeburg.de> (Utz-Uwe Haus's message of "Fri, 26 Oct 2007 19:20:21 +0200") References: <87bqamngzu.fsf@cantab.net> <20071026172021.GZ19924@merkur.math.uni-magdeburg.de> Message-ID: <87fxztrdxi.fsf@cantab.net> Utz-Uwe Haus writes: > Hi everybody, > > On Wed, Oct 24, 2007 at 11:07:39AM +0100, Christophe Rhodes wrote: >> I have a SOAP server, built using gsoap, which automatically generates >> the attached .wsdl file; and I can successfully use cl-soap to call it >> by hand as follows: > [dd] > >> > > vs. > >> > > seems the culprit. I guess that is due to the basically nonexistant > support of mixing namespaces in cl-soap. I had started to fix this in > the beginning of this year, but since that was supposed to be sugar on top > of another project which has been delayed in its main part, this is not > finished. If you care, please look at my patched version at > > > If that helps you any, please let me know, since it may convince me to > clean things up to get things merged. I'm afraid it doesn't seem to help me. Firstly, I had to alter a couple of things in your patch to s-xml to get it to compile: * in FIND-NAMESPACE-MAP, I removed the declaration, as FIND-NAMESPACE-MAP is elsewhere being called with a non-string argument (:SCHEMA1999 is the first one, I believe, from INITIALIZE-SOAP-ENVIRONMENT in cl-soap-uhh/src/namespaces.lisp; * in DEDUCE-NAMESPACE-FROM-NAMESPACE-ENTRY, I changed "(gensym key)" to (gensym (string key)). With these two changes, your branch compiles and loads cleanly (well, apart from constant redefinition warnings) into sbcl. However, it doesn't work: * The previously-working hand-built call to soap-call: (let ((ns "http://tempuri.org/adb.xsd")) (s-xml:register-namespace ns "adb" :adb) (let ((xmethods (make-soap-end-point "http://gibbons.doc.gold.ac.uk:20703"))) (soap-call xmethods nil `((adb::|status| :|xmlns:adb| ,ns) (:|dbName| "/tmp/foodb"))))) gives an infinite recursion; a section of the backtrace is 14: (S-XML::DEDUCE-NAMESPACE-FROM-NAMESPACE-ENTRY "http://schemas.xmlsoap.org/soap/envelope/" "SOAP-ENV" :ALL) 15: (S-XML::FIND-NAMESPACE-IN-MAP "http://schemas.xmlsoap.org/soap/envelope/" "SOAP-ENV" #) 16: (S-XML::DEDUCE-NAMESPACE-FROM-NAMESPACE-ENTRY "http://schemas.xmlsoap.org/soap/envelope/" "SOAP-ENV" :ALL) 17: (S-XML::FIND-NAMESPACE-IN-MAP "http://schemas.xmlsoap.org/soap/envelope/" "SOAP-ENV" #) * trying to call the service automatically from the wsdl, (wsdl-soap-call "http://omras2.doc.gold.ac.uk/adb.wsdl" "status" :input `("status" ("dbName" "/tmp/foodb"))) gives a type error in BIND-XSD-TEMPLATE: The value (LAMBDA () :STRING) is not of type (OR FUNCTION SYMBOL). and the backtrace there is 0: (BIND-XSD-TEMPLATE (? "http://tempuri.org/adb.xsd" "dbName" (LAMBDA () :STRING)) ("dbName" "/tmp/foodb") (#) #) 1: (BIND-XSD-TEMPLATE-MEMBERS |adb|::|status| ((? "http://tempuri.org/adb.xsd" "dbName" (LAMBDA # :STRING))) ("dbName" "/tmp/foodb") (#) #) 2: (BIND-XSD-TEMPLATE (1 "http://tempuri.org/adb.xsd" "status" #) ("status" ("dbName" "/tmp/foodb")) (#) #) 3: (BIND-ELEMENT "adb:status" ("status" ("dbName" "/tmp/foodb")) (#) #) 4: (BIND-INPUT-PARTS # ("status" ("dbName" "/tmp/foodb")) #) 5: (WSDL-SOAP-DOCUMENT-CALL # # "\"\"" # # # NIL # NIL ..) Thanks, Christophe From haus+cl-soap at mail.math.uni-magdeburg.de Mon Oct 29 21:20:53 2007 From: haus+cl-soap at mail.math.uni-magdeburg.de (Utz-Uwe Haus) Date: Mon, 29 Oct 2007 22:20:53 +0100 Subject: [cl-sockets-devel] wsdl parsing In-Reply-To: <87fxztrdxi.fsf@cantab.net> References: <87bqamngzu.fsf@cantab.net> <20071026172021.GZ19924@merkur.math.uni-magdeburg.de> <87fxztrdxi.fsf@cantab.net> Message-ID: <20071029212053.GM19924@merkur.math.uni-magdeburg.de> Hi, On Mon, Oct 29, 2007 at 06:08:57PM +0000, Christophe Rhodes wrote: > I'm afraid it doesn't seem to help me. Sorry to see that. > Firstly, I had to alter a couple of things in your patch to s-xml to > get it to compile: Thanks. ACL does not check declarations as much as SBCL, and I must have mixed some things up there. > * The previously-working hand-built call to soap-call: > > (let ((ns "http://tempuri.org/adb.xsd")) > (s-xml:register-namespace ns "adb" :adb) > (let ((xmethods (make-soap-end-point "http://gibbons.doc.gold.ac.uk:20703"))) > (soap-call xmethods nil `((adb::|status| :|xmlns:adb| ,ns) (:|dbName| "/tmp/foodb"))))) > > gives an infinite recursion; a section of the backtrace is > > 14: (S-XML::DEDUCE-NAMESPACE-FROM-NAMESPACE-ENTRY > "http://schemas.xmlsoap.org/soap/envelope/" > "SOAP-ENV" > :ALL) > 15: (S-XML::FIND-NAMESPACE-IN-MAP > "http://schemas.xmlsoap.org/soap/envelope/" > "SOAP-ENV" > #) I'll look into that. Apparently your namespace registration did not make it into the namespace map properly. When I last looked at that in s-xml I had to make some seemingly reasonable assumptions because there was (is?) no proper namespace map support. Maybe one of those failed. > * trying to call the service automatically from the wsdl, > > (wsdl-soap-call "http://omras2.doc.gold.ac.uk/adb.wsdl" "status" :input `("status" ("dbName" "/tmp/foodb"))) > > gives a type error in BIND-XSD-TEMPLATE: > > The value (LAMBDA () :STRING) is not of type (OR FUNCTION SYMBOL). > > and the backtrace there is actually looking pretty reasonable. I'll see what I can do, Utz -- Utz-Uwe Haus haus at mail.math.uni-magdeburg.de Inst. f. Mathemat. Optim. utz at uuhaus.de Uni Magdeburg PGP keys 1024/6AD23BE1 and 2048/5D0B72A1 GERMANY available via keyservers or email request