[cl-sockets-devel] wsdl parsing
Christophe Rhodes
csr21 at cantab.net
Mon Oct 29 18:08:57 UTC 2007
Utz-Uwe Haus <haus+cl-soap at mail.math.uni-magdeburg.de> 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]
>
>> <adb:status xmlns:adb="http://tempuri.org/adb.xsd">
>
> vs.
>
>> <status>
>
> 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
> <http://code.google.com/p/cl-soap-uuh/>
>
> 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"
#<unavailable argument>)
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"
#<unavailable argument>)
* 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")
(#<XML-SCHEMA-DEFINITION target http://tempuri.org/adb.xsd, 6 elements {10041F8181}>)
#<S-XML::XML-NAMESPACE tns - http://gibbons.doc.gold.ac.uk:20703//Service.wsdl {100254A6C1}>)
1: (BIND-XSD-TEMPLATE-MEMBERS
|adb|::|status|
((? "http://tempuri.org/adb.xsd" "dbName" (LAMBDA # :STRING)))
("dbName" "/tmp/foodb")
(#<XML-SCHEMA-DEFINITION target http://tempuri.org/adb.xsd, 6 elements {10041F8181}>)
#<S-XML::XML-NAMESPACE tns - http://gibbons.doc.gold.ac.uk:20703//Service.wsdl {100254A6C1}>)
2: (BIND-XSD-TEMPLATE
(1 "http://tempuri.org/adb.xsd" "status" #<CLOSURE # {1002BC9929}>)
("status" ("dbName" "/tmp/foodb"))
(#<XML-SCHEMA-DEFINITION target http://tempuri.org/adb.xsd, 6 elements {10041F8181}>)
#<S-XML::XML-NAMESPACE tns - http://gibbons.doc.gold.ac.uk:20703//Service.wsdl {100254A6C1}>)
3: (BIND-ELEMENT
"adb:status"
("status" ("dbName" "/tmp/foodb"))
(#<XML-SCHEMA-DEFINITION target http://tempuri.org/adb.xsd, 6 elements {10041F8181}>)
#<S-XML::XML-NAMESPACE tns - http://gibbons.doc.gold.ac.uk:20703//Service.wsdl {100254A6C1}>)
4: (BIND-INPUT-PARTS
#<WSDL-MESSAGE "status" {1002BBAF31}>
("status" ("dbName" "/tmp/foodb"))
#<WSDL-DOCUMENT-DEFINITIONS "Service" {10041F8111}>)
5: (WSDL-SOAP-DOCUMENT-CALL
#<WSDL-DOCUMENT-DEFINITIONS "Service" {10041F8111}>
#<SOAP-END-POINT {1002BC18F1}>
"\"\""
#<WSDL-MESSAGE "status" {1002BBAF31}>
#<WSDL-MESSAGE "statusResponse" {1002BBAFF1}>
#<WSDL-SOAP-BODY {1002BBF2E1}>
NIL
#<WSDL-SOAP-BODY {1002BBFDC1}>
NIL ..)
Thanks,
Christophe
More information about the cl-soap-devel
mailing list