From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Harris Newsgroups: gmane.emacs.bugs Subject: bug#10331: Feature request: SOAP simpleType Date: Mon, 19 Dec 2011 13:27:18 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1324330398 13820 80.91.229.12 (19 Dec 2011 21:33:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2011 21:33:18 +0000 (UTC) To: 10331@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 19 22:33:14 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rckpd-0001Sg-QC for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 22:33:14 +0100 Original-Received: from localhost ([::1]:49468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckpd-0001CM-8y for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 16:33:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RckpZ-0001Aw-Gj for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:33:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RckpY-0005u0-90 for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:33:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RckpY-0005ts-6i for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:33:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RckrN-0008Hq-KA for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:35:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ken Harris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2011 21:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10331 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132433045331795 (code B ref -1); Mon, 19 Dec 2011 21:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2011 21:34:13 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rckqb-0008Gl-2C for submit@debbugs.gnu.org; Mon, 19 Dec 2011 16:34:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rcklr-0007PD-Ro for submit@debbugs.gnu.org; Mon, 19 Dec 2011 16:29:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rckjz-0004oz-Rx for submit@debbugs.gnu.org; Mon, 19 Dec 2011 16:27:25 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:45330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckjz-0004ov-NL for submit@debbugs.gnu.org; Mon, 19 Dec 2011 16:27:23 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckjy-00078C-ED for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:27:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rckjw-0004oS-PN for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:27:22 -0500 Original-Received: from mail-ee0-f41.google.com ([74.125.83.41]:44332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckjw-0004oG-GY for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:27:20 -0500 Original-Received: by eekc41 with SMTP id c41so5965317eek.0 for ; Mon, 19 Dec 2011 13:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=+3QTkzCuxEYN4fQ+41XgMJ6BHe/8S+KCQOW4Q4fT/Zk=; b=DPq/WWd2k4VmZePnCef2ywcHvmoFnOak2tLt/5Wufz/zgCaBc4Hr2C/npKKPeSpudx MrTWErszf+K/lI3tUO3VS8k1mBsZTpXCuUmG/FjCJNvzS9RzpQnqT4KhtNg9a84Psclb uFMrkQWl543CzQlt4x3MAyW81tkNQqwnEXm1U= Original-Received: by 10.213.101.8 with SMTP id a8mr1836869ebo.40.1324330038654; Mon, 19 Dec 2011 13:27:18 -0800 (PST) Original-Received: by 10.213.113.193 with HTTP; Mon, 19 Dec 2011 13:27:18 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 19 Dec 2011 16:34:12 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 19 Dec 2011 16:35:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55076 Archived-At: Hi, emacs! I hope this is the right place to send feature requests. I've been playing with Emacs 24's soap-client.el library, which is a fantastic concept. The "soap-load-wsdl-from-url" function seems to work in some cases, but not in others. I am certainly not an expert on SOAP or soap-client but one thing that I've discovered is that it does not seem to know about "simpleType". (The term "simpleType" does not appear in the source code. The function soap-parse-schema looks at only xsd:complexType and xsd:element.) Here's an example of a WSDL that fails on a simpleType (called "AdultOption"): (soap-load-wsdl-from-url "http://api.search.live.net/search.wsdl") Rather than parsing and returning a WSDL object, it gives a backtrace. Here's the top of it (the interesting part): Debugger entered--Lisp error: (error "Soap-wsdl-get((http://schemas.microsoft.com/LiveSearch/2008/03/Search . AdultOption)): cannot find element") signal(error ("Soap-wsdl-get((http://schemas.microsoft.com/LiveSearch/2008/03/Search . AdultOption)): cannot find element")) error("Soap-wsdl-get(%s): cannot find element" ("http://schemas.microsoft.com/LiveSearch/2008/03/Search" . "AdultOption")) (if element nil (error "Soap-wsdl-get(%s): cannot find element" name)) (unless element (error "Soap-wsdl-get(%s): cannot find element" name)) (let ((alias-table ...) namespace element-name element) (when (symbolp name) (setq name ...)) (when use-local-alias-table (setq alias-table ...)) (cond (... ... ... ... ...) (... ... ...) (t ...)) (setq element (soap-namespace-get element-name namespace ...)) (unless element (error "Soap-wsdl-get(%s): cannot find element" name)) (if (soap-namespace-link-p element) (soap-wsdl-get ... wsdl predicate) element)) soap-wsdl-get(("http://schemas.microsoft.com/LiveSearch/2008/03/Search" . "AdultOption") [cl-struct-soap-wsdl nil ([cl-struct-soap-port "BingPort" nil "http://api.search.live.net:80/soap.asmx" ...]) (("ns1" . "urn:BingPortType") ("soapenc" . "http://schemas.xmlsoap.org/soap/encoding/") ("xsd" . "http://www.w3.org/2001/XMLSchema") ("tns" . "http://schemas.microsoft.com/LiveSearch/2008/03/Search") ("wsa" . "http://schemas.xmlsoap.org/ws/2004/08/addressing") ("wsdl" . "http://schemas.xmlsoap.org/wsdl/") ("soap" . "http://schemas.xmlsoap.org/wsdl/soap/") ("xsi" . "http://www.w3.org/2001/XMLSchema-instance") ("xsd" . "http://www.w3.org/2001/XMLSchema")) ([cl-struct-soap-namespace "urn:BingPortType" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ("Search" ... "SearchRequestMessage" ... "SearchResponseMessage" ... ...))] [cl-struct-soap-namespace "http://schemas.microsoft.com/LiveSearch/2008/03/Search" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ("SearchRequest" ... "ArrayOfSearchOption" ... "ArrayOfSourceType" ... "WebRequest" ... "ArrayOfWebSearchOption" ... "ArrayOfString" ... "ImageRequest" ... "PhonebookRequest" ... "VideoRequest" ... "NewsRequest" ... "MobileWebRequest" ... "ArrayOfMobileWebSearchOption" ... "TranslationRequest" ... "SearchResponse" ... "Query" ... "SpellResponse" ... "ArrayOfSpellResult" ... "SpellResult" ... "WebResponse" ... "ArrayOfWebResult" ... "WebResult" ... "ArrayOfWebSearchTag" ... "WebSearchTag" ... "ArrayOfDeepLink" ... "DeepLink" ... "ImageResponse" ... "ArrayOfImageResult" ... "ImageResult" ... "Thumbnail" ... "RelatedSearchResponse" ... "ArrayOfRelatedSearchResult" ... "RelatedSearchResult" ... "PhonebookResponse" ... "ArrayOfPhonebookResult" ... "PhonebookResult" ... "VideoResponse" ... "ArrayOfVideoResult" ... "VideoResult" ... "InstantAnswerResponse" ... "ArrayOfInstantAnswerResult" ... "InstantAnswerResult" ... "NewsResponse" ... "ArrayOfNewsRelatedSearch" ... "NewsRelatedSearch" ... "ArrayOfNewsResult" ... "NewsResult" ... "ArrayOfNewsCollection" ... "NewsCollection" ... "ArrayOfNewsArticle" ... "NewsArticle" ... ...))] [cl-struct-soap-namespace "http://schemas.xmlsoap.org/soap/encoding/" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ("string" ... "dateTime" ... "boolean" ... "long" ... "int" ... "integer" ... "byte" ... "float" ... "base64Binary" ... "anyType" ... "anyURI" ... "Array" ... "byte[]" ... ...))] [cl-struct-soap-namespace "http://www.w3.org/2001/XMLSchema" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ("string" ... "dateTime" ... "boolean" ... "long" ... "int" ... "integer" ... "byte" ... "float" ... "base64Binary" ... "anyType" ... "anyURI" ... "Array" ... "byte[]" ... ...))])] soap-type-p) [...and more...] I've found that with my own application's WSDL, if I comment out all uses of simpleType, then soap-client.el can load it just fine. I have no idea how hard it would be to implement simpleType, but it would definitely be very useful! I may take a stab at this myself, but no promises. - Ken