Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What am I doing wrong?
Message
From
09/11/2005 10:55:10
 
 
To
09/11/2005 10:31:26
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01066780
Message ID:
01066795
Views:
21
Hi, Roger
What line does this occur on?

Beth

>I'm trying to connect to a currency conversion web service. I've registered the service, used the example code stub as a a basis, and intellisense for the syntax - all I get is an error message: "Error 1300, Function Name is missing an )".
>
>Code:
>
>LOCAL loCurrencyConvertor AS "XML Web Service"
>* LOCAL loCurrencyConvertor AS "MSSOAP.SoapClient30"
>* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
>*__VFPWSDef__: loCurrencyConvertor = http://www.webservicex.net/CurrencyConvertor.asmx?wsdl , CurrencyConvertor , CurrencyConvertorSoap
>LOCAL loException, lcErrorMsg, loWSHandler
>TRY
> loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
> loCurrencyConvertor = loWSHandler.SetupClient("http://www.webservicex.net/CurrencyConvertor.asmx?wsdl", "CurrencyConvertor", "CurrencyConvertorSoap")
> * Call your XML Web service here. ex: leResult = loCurrencyConvertor.SomeMethod()
> FromCurrency = [GBP]
> ToCurrency = [USD]
> lnResult = loCurrencyConvertor.ConversionRate(FromCurrency as Currency, ToCurrency as Currency) as double
>
>CATCH TO loException
> lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
> DO CASE
> CASE VARTYPE(loCurrencyConvertor)#"O"
> * Handle SOAP error connecting to web service
> CASE !EMPTY(loCurrencyConvertor.FaultCode)
> * Handle SOAP error calling method
> lcErrorMsg=lcErrorMsg+CHR(13)+loCurrencyConvertor.Detail
> OTHERWISE
> * Handle other error
> ENDCASE
> * Use for debugging purposes
> MESSAGEBOX(lcErrorMsg)
>FINALLY
>ENDTRY
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform