[Gambas-user] gambas3 and web services
Caveat
Gambas at ...1950...
Tue Jun 21 14:00:34 CEST 2011
I just made a quick example using one of the free Web Services out on
the interwebbase ;-)
Your project will need to include networking (obviously!)
Dim http As HttpClient
Dim buffer As String
http = New HttpClient As "http"
http.URL =
"http://www.webservicex.net/ConvertTemperature.asmx/ConvertTemp"
http.Async = False
http.Timeout = 60
http.Post("application/x-www-form-urlencoded",
"Temperature=100&FromUnit=degreeCelsius&ToUnit=degreeFahrenheit")
Print "begin"
If http.Status < 0 Then
Print "ERROR"
Else
' Success - read data
If Lof(http) Then Read #http, buffer, Lof(http)
Print buffer
End If
Print "end"
The result is:
begin
<?xml version="1.0" encoding="utf-8"?>
<double xmlns="http://www.webserviceX.NET/">212</double>
end
This just converts a temperature from one unit to another (100C = 212F).
You should be able to pick the bones out of this to make a specific
client for the Web Service(s) you want to use. For more details of the
example WS I used, see
http://www.webservicex.net/ConvertTemperature.asmx?op=ConvertTemp
Regards,
Caveat
On Tue, 2011-06-21 at 10:02 +0200, Almanova Sistemi wrote:
> attached to this mail the wsdl requested.
>
> I hope that this can hep me to develop my application.
>
> Regards,
> Massimo
> > I think this should be possible. I've worked with Web Services from out
> > of java and c# and in its simplest form it's just a case of POSTing
> > parameters on a request.
> >
> > In java you have the advantage of several tools which can read the WSDL
> > for you and automatically generate client code with stubs for the
> > methods to call the Web Service(s). I'm guessing you don't want to get
> > quite that ambitious at this stage?
> >
> > I've done POSTing of parameters in Gambas (somewhere, I have to look for
> > the code!)
> >
> > Can you share the WSDL and/or any existing client code with us?
> >
> > Regards,
> > Caveat
> >
> > On Mon, 2011-06-20 at 09:37 +0200, Almanova Sistemi wrote:
> > > Hallo to everyone,
> > >
> > > I am Massimo and I try to write a client software (in gambas 3) that use
> > > a web services.
> > > In other word the software send data with saop protocol an receive data
> > > with the same protocol.
> > >
> > > The information about the availebe services are described in a WSDL file.
> > >
> > > Now, hor Can I do this with gambas?
> > >
> > > Best Regards,
> > > Massimo.
> > > ------------------------------------------------------------------------------
> > > EditLive Enterprise is the world's most technically advanced content
> > > authoring tool. Experience the power of Track Changes, Inline Image
> > > Editing and ensure content is compliant with Accessibility Checking.
> > > http://p.sf.net/sfu/ephox-dev2dev
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at ...1107...
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list