GNU bug report logs - #10331
Feature request: SOAP simpleType

Previous Next

Package: emacs;

Reported by: Ken Harris <kengruven <at> gmail.com>

Date: Mon, 19 Dec 2011 21:35:01 UTC

Severity: wishlist

Fixed in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Forwarded to http://code.google.com/p/emacs-soap-client/issues/detail?id=9

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10331 in the body.
You can then email your comments to 10331 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Mon, 19 Dec 2011 21:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Harris <kengruven <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 19 Dec 2011 21:35:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Harris <kengruven <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Feature request: SOAP simpleType
Date: Mon, 19 Dec 2011 13:27:18 -0800
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Tue, 20 Dec 2011 12:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Harris <kengruven <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org
Subject: Re: bug#10331: Feature request: SOAP simpleType
Date: Tue, 20 Dec 2011 13:09:25 +0100
Ken Harris <kengruven <at> gmail.com> writes:

> Hi, emacs!  I hope this is the right place to send feature requests.

Hi Ken,

> 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.

I have reported the issue at the soap-client's issue tracker:
<http://code.google.com/p/emacs-soap-client/issues/detail?id=9>

> - Ken

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Tue, 20 Dec 2011 22:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Harris <kengruven <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org
Subject: Re: bug#10331: Feature request: SOAP simpleType
Date: Tue, 20 Dec 2011 23:35:27 +0100
Alex did accept the request. From the emacs-soap-client issue tracker:

Comment #1 on issue 9 by AlexHars...@gmail.com: Feature request: SOAP simpleType
http://code.google.com/p/emacs-soap-client/issues/detail?id=9

Thanks for reporting this, I will add simpleType to the list of
supported SOAP types.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Wed, 21 Dec 2011 17:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Harris <kengruven <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org
Subject: Re: bug#10331: Feature request: SOAP simpleType
Date: Wed, 21 Dec 2011 18:13:37 +0100
Comment #2 on issue 9 by AlexHars...@gmail.com: Feature request: SOAP simpleType
http://code.google.com/p/emacs-soap-client/issues/detail?id=9

This issue was updated by revision a0ff70908303.

Added support for the simpleType and the WSDL at
http://api.search.live.net/search.wsdl loads without error.
Unfortunately it is not usable yet because the WSDL document defines two
entities with the same name: "SearchRequest" is both an xsd:element and
an xsd:complexType.  soap-client.el will need to be modified to account
for this possibility.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Fri, 30 Dec 2011 09:50:02 GMT) Full text and rfc822 format available.

Message #17 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Harris <kengruven <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org
Subject: Re: bug#10331: Feature request: SOAP simpleType
Date: Fri, 30 Dec 2011 10:46:07 +0100
Comment #3 on issue 9 by AlexHars...@gmail.com: Feature request: SOAP
simpleType
http://code.google.com/p/emacs-soap-client/issues/detail?id=9

This issue was updated by revision 135e07156c5a.

I added a workaround for preventing simple self references, which works
with the WSDL from http://api.search.live.net/search.wsdl; It is unclear
to me what the correct/general solution would be.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Fri, 30 Dec 2011 09:51:01 GMT) Full text and rfc822 format available.

Message #20 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Harris <kengruven <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org
Subject: Re: bug#10331: Feature request: SOAP simpleType
Date: Fri, 30 Dec 2011 10:47:47 +0100
Comment #4 on issue 9 by AlexHars...@gmail.com: Feature request: SOAP
simpleType
http://code.google.com/p/emacs-soap-client/issues/detail?id=9

The referenced WSDL now loads properly, but there is a bug in the
Emacs xml.el which prevents the response from the server to be parsed.
This has been reported as:

    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10405

Also, the search API is not usable since it requires specifying an
"AppId" parameter, which need to be obtained first (this is outside
the scope of soap-client), see this link for details:

    http://msdn.microsoft.com/en-us/library/dd251020.aspx




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10331; Package emacs. (Wed, 25 Apr 2012 10:37:02 GMT) Full text and rfc822 format available.

Message #23 received at 10331 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Alex Harsanyi <alexharsanyi <at> gmail.com>
Cc: 10331 <at> debbugs.gnu.org, Ken Harris <kengruven <at> gmail.com>
Subject: Re: Patch for soap-client simpleType support
Date: Wed, 25 Apr 2012 12:35:36 +0200
Alex Harsanyi <alexharsanyi <at> gmail.com> writes:

> Hi Michael,

Hi Alex,

> I added support for simpleType, plus some more xsd basic types to
> soap-client.el, plus some fixes for the peculiarities of the WSDL at
> http://api.search.live.net/search.wsdl.  Unfortunately, that API
> cannot be used directly because it requires an AppId parameter for
> which one needs to register with Microsoft, this is out of scope for
> the soap-client project.  Please see further explanations about the
> fix here:
>
>    http://code.google.com/p/emacs-soap-client/issues/detail?id=9
>
> Please note that I found a bug in xml.el which prevents parsing fault
> responses from the live search api.  I logged the bug here:
>
>    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10405
>
> I attached a patch against the latest source in the emacs trunk, plus
> the ChangeLog entries (alternatively, you can browse the source at the
> projects site).  Please let me know if you want me to make any
> modifications to the patch.

Finally, I have committed your patch to Emacs' trunk (it is reopened for
new features). Your xml patch found its way into Emacs 24.1.

Ken, could you, please, test whether this fixes your request?

> Best Regards,
> Alex.

Best regards, Michael.




Set bug forwarded-to-address to 'http://code.google.com/p/emacs-soap-client/issues/detail?id=9'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 30 Nov 2012 22:02:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.3, send any further explanations to 10331 <at> debbugs.gnu.org and Ken Harris <kengruven <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 30 Nov 2012 22:02:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 29 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.