3

I've searched all over for an example of using a Common Lisp library (like Drakma) to call a RESTful web service, but all I've found are specific API calls to third party services. The Drakma site doesn't indicate how a schema would be used with an http service call.

If I have an schema/XSD and a URL for a RESTful web service that I'd like to invoke, is there a quick tutorial on how to get started calling the service, and what a response would look like?

  • There are really two questions here: 1. How to actually call the webservice. That's just a matter of putting the right request (HTTP verb, headers, and request body) together. Drakma can do that for you. 2. How to generate data that can be suitably sent to the web service, and how to process that data that comes back. That's much more web service specific. In your case, there's an XSD schema, but that's not universal; the web service could return HTML, JSON, plain text, binary data, etc. – Joshua Taylor May 13 '15 at 12:38
  • While this is an interesting question, it's not really on topic for Stack Overflow, where "**Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource** are off-topic ... as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." Is there a particular web service you're trying to interact with? What specific problems have you run into? – Joshua Taylor May 13 '15 at 12:39
  • Well, this is a specific company homegrown web service, and we're asked to build a client to interface with it in LISP. I don't know how LISP can do that, but I know that there is a schema to use. I found out about Drakma, but I don't know how to apply the shcema to the http request. – David Dotson May 14 '15 at 14:43

1 Answers1

1

Here are two things that you can try. The first is an course assignment for EECS 235 at Northwestern University that walks through using XML-RPC in Lisp. This links to library and gives examples of how to use it. The second is Allegro's Common Lisp API for SOAP.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
anquegi
  • 11,125
  • 4
  • 51
  • 67