Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MCI DAWS Web Service?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
MCI DAWS Web Service?
Divers
Thread ID:
00787481
Message ID:
00787481
Vues:
45
Has anyone successfully connected to MCI's 'Directory Assistance Web Service'? You're supposed to be able to send address info, and it returns a phone number.

My trouble is when I call the web service in VFP8, I don't get the expected XML string back. If I strongly type the result string as 'string' it comes back undefined, and when it's loosely type it returns an empty object.

The stuff below is mostly generated from intellisense:
TRY
	loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
	loSearchSoap = loWSHandler.SetupClient("http://206.112.70.200/daws/da.asmx?WSDL", "Search", "SearchSoap")
	* Call your XML Web service here.  ex: leResult = loSearchSoap.SomeMethod()
	lcResults = loSearchSoap.ResidentialExt("hogan", "", "Dearborn", "Chicago", ;
		"IL", "", 5, .T., "")
	WAIT WINDOW "lcResults Variable Type = "+VARTYPE(loResults)
	WAIT WINDOW "Results Returned Length: "+TRANSFORM(LEN(lcResults))
	WAIT WINDOW "Done"
CATCH TO loException
	lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message+" - "+TRANSFORM(loException.LineNo)
	DO CASE
	CASE VARTYPE(loSearchSoap)#"O"
		* Handle SOAP error connecting to web service
	CASE !EMPTY(loSearchSoap.FaultCode)
		* Handle SOAP error calling method
		lcErrorMsg=lcErrorMsg+CHR(13)+loSearchSoap.Detail
	OTHERWISE
		* Handle other error
	ENDCASE
	* Use for debugging purposes
	MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Répondre
Fil
Voir

Click here to load this message in the networking platform