From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b665e18fea6a2fca X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!u3g2000vbe.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: using a web service from Ada Date: Mon, 14 Mar 2011 04:11:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: <217eba90-1c4f-486b-9ac9-161161012f49@u3g2000vbe.googlegroups.com> References: <8ecb8ebc-1da1-4009-bd8c-2a89cd4dd31b@s3g2000vbf.googlegroups.com> <1ae8197d-54ec-4283-9f65-619df87aedf9@p16g2000vbo.googlegroups.com> <44aec9de-ae4c-489c-9f81-03ef91cfb58d@j13g2000pro.googlegroups.com> NNTP-Posting-Host: 92.17.25.233 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1300101067 23320 127.0.0.1 (14 Mar 2011 11:11:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 14 Mar 2011 11:11:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u3g2000vbe.googlegroups.com; posting-host=92.17.25.233; posting-account=28F2IwkAAACL1Z5nRC-dE7zuvWdbWC7P User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid) Firefox/3.6.15,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19130 Date: 2011-03-14T04:11:06-07:00 List-Id: On Mar 13, 7:43=A0pm, Vadim Godunko wrote: > On Mar 13, 7:10=A0pm, tonyg wrote: > > > > > On Mar 12, 8:23=A0pm, Gautier write-only > > wrote: > > > > On Mar 12, 7:40=A0pm, tonyg wrote: > > > > > I want to access a web service from ada (specifically the 5 day > > > > prediction from the weather channel). I am reading trough the > > > > documentation of aws and I would really appreciate an example from = the > > > > http client point of view. I've looked at the examples of aws and I= 'm > > > > a bit overwhelmed. Anyone got an example? > > > > Here is one: > > > > with Ada.Text_IO; use Ada.Text_IO; > > > > with AWS.Client; > > > with AWS.Response; > > > > procedure HTTP_Request is > > > begin > > > =A0 =A0Put_Line (AWS.Response.Message_Body (AWS.Client.Get (URL =3D> = "http:// > > > gautiersblog.blogspot.com/"))); > > > end HTTP_Request; > > > > HTH > > > G. > > > wow thanks thats seems easy. Any tips on processing the xml results? > > There are two options: XmlAda and XML processor of Matreshka. I know its lazy but its a one off job so I'm using the above aws http_request method and the ada.strings.fix index function to locate my data. I had some trouble understanding how to use the adaxml library to do what I wanted.