comp.lang.ada
 help / color / mirror / Atom feed
* using a web service from Ada
@ 2011-03-12 18:40 tonyg
  2011-03-12 20:23 ` Gautier write-only
  0 siblings, 1 reply; 5+ messages in thread
From: tonyg @ 2011-03-12 18:40 UTC (permalink / raw)



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?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a web service from Ada
  2011-03-12 18:40 using a web service from Ada tonyg
@ 2011-03-12 20:23 ` Gautier write-only
  2011-03-13 16:10   ` tonyg
  0 siblings, 1 reply; 5+ messages in thread
From: Gautier write-only @ 2011-03-12 20:23 UTC (permalink / raw)


On Mar 12, 7:40 pm, tonyg <tonytheg...@gmail.com> 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
   Put_Line (AWS.Response.Message_Body (AWS.Client.Get (URL => "http://
gautiersblog.blogspot.com/")));
end HTTP_Request;

HTH
G.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a web service from Ada
  2011-03-12 20:23 ` Gautier write-only
@ 2011-03-13 16:10   ` tonyg
  2011-03-13 19:43     ` Vadim Godunko
  0 siblings, 1 reply; 5+ messages in thread
From: tonyg @ 2011-03-13 16:10 UTC (permalink / raw)


On Mar 12, 8:23 pm, Gautier write-only <gautier_niou...@hotmail.com>
wrote:
> On Mar 12, 7:40 pm, tonyg <tonytheg...@gmail.com> 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
>    Put_Line (AWS.Response.Message_Body (AWS.Client.Get (URL => "http://
> gautiersblog.blogspot.com/")));
> end HTTP_Request;
>
> HTH
> G.

wow thanks thats seems easy. Any tips on processing the xml results?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a web service from Ada
  2011-03-13 16:10   ` tonyg
@ 2011-03-13 19:43     ` Vadim Godunko
  2011-03-14 11:11       ` tonyg
  0 siblings, 1 reply; 5+ messages in thread
From: Vadim Godunko @ 2011-03-13 19:43 UTC (permalink / raw)


On Mar 13, 7:10 pm, tonyg <tonytheg...@gmail.com> wrote:
> On Mar 12, 8:23 pm, Gautier write-only <gautier_niou...@hotmail.com>
> wrote:
>
>
>
>
>
>
>
>
>
> > On Mar 12, 7:40 pm, tonyg <tonytheg...@gmail.com> 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
> >    Put_Line (AWS.Response.Message_Body (AWS.Client.Get (URL => "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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a web service from Ada
  2011-03-13 19:43     ` Vadim Godunko
@ 2011-03-14 11:11       ` tonyg
  0 siblings, 0 replies; 5+ messages in thread
From: tonyg @ 2011-03-14 11:11 UTC (permalink / raw)


On Mar 13, 7:43 pm, Vadim Godunko <vgodu...@gmail.com> wrote:
> On Mar 13, 7:10 pm, tonyg <tonytheg...@gmail.com> wrote:
>
>
>
> > On Mar 12, 8:23 pm, Gautier write-only <gautier_niou...@hotmail.com>
> > wrote:
>
> > > On Mar 12, 7:40 pm, tonyg <tonytheg...@gmail.com> 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
> > >    Put_Line (AWS.Response.Message_Body (AWS.Client.Get (URL => "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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-14 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-12 18:40 using a web service from Ada tonyg
2011-03-12 20:23 ` Gautier write-only
2011-03-13 16:10   ` tonyg
2011-03-13 19:43     ` Vadim Godunko
2011-03-14 11:11       ` tonyg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox