Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not Creating Object Correctly
Message
From
14/02/2005 11:24:42
 
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00985142
Message ID:
00986668
Views:
61
Hi Viv

Thanks for your reply. I am using _ws3client. My code is

LOCAL loAirportWeather AS "XML Web Service"
* LOCAL loAirportWeather AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: loAirportWeather = http://www.capescience.com/webservices/airportweather/AirportWeather.wsdl , AirportWeather , AirportWeather
LOCAL loException, lcErrorMsg, loWSHandler
TRY
loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
loAirportWeather = loWSHandler.SetupClient("http://www.capescience.com/webservices/airportweather/AirportWeather.wsdl", "AirportWeather", "AirportWeather")
* Call your XML Web service here. ex: leResult = loAirportWeather.SomeMethod()
loSummary = loAirportWeather .getSummary("KSEA")

lcText = loSummary.Item(2).Text


MESSAGEBOX(lcText, "KSEA Weather Conditions")

CATCH TO loException
lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
DO CASE
CASE VARTYPE(loAirportWeather)#"O"
* Handle SOAP error connecting to web service
CASE !EMPTY(loAirportWeather.FaultCode)
* Handle SOAP error calling method
lcErrorMsg=lcErrorMsg+CHR(13)+loAirportWeather.Detail
OTHERWISE
* Handle other error
ENDCASE
* Use for debugging purposes
MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY

Don't know why my autogenerated 'SetUpClient' code is different to that in the example.

I was hoping that if I got this example working it would point to the problem with my problem but it might not be the case. I have spoken to the people dealing with the web service I am trying to connect to via VPN and they have very little VFP experience but have installed a version of VFP8. They have got the AirportWeather webservice working but are still unable to connect to their own web service. I think they are nearly at the point of saying that it looks like we will be unable to use it.

Any further ideas of how I can move forward would be more than welcome - I hate being beaten. The only option I can think of if I just can't do it in VFP would be to try and connect using VB and call VB routines from my VFP application but I really would like to do it all in VFP.

Thanks again

Sue
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform