Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Como llamar a un webservice desde VFP
Message
 
 
À
08/03/2007 20:32:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01201543
Message ID:
01202391
Vues:
25
Hola, Claudio.

>En VFP9 lo probe y me dio el siguiente error.
>Error generating intellisense scripts. Check for a valid WSDL URL location or invalid WSDL content.The WSDL file may have also been in use - try regenerating the XML Web Service files again.......es mas largo..

Pues acabo de robarlo y funciona sin problemas. Revisa si copiaste exactamente la dirección, dado el error que estás obteniendo. Te copio el código que me generó (también probé llamar al método execute, con el parámetro en 0, y ejecutó correctamente).
LOCAL loWSATLATU AS "XML Web Service"
* LOCAL loWSATLATU AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: loWSATLATU = http://www.aduanas.gub.uy/webservicesuy/awsatlatu.aspx?wsdl , WSATLATU , WSATLATUSoapPort
LOCAL loException, lcErrorMsg, loWSHandler
TRY
	loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
	loWSATLATU = loWSHandler.SetupClient("http://www.aduanas.gub.uy/webservicesuy/awsatlatu.aspx?wsdl", "WSATLATU", "WSATLATUSoapPort")
	* Call your XML Web service here.  ex: leResult = loWSATLATU.SomeMethod()
	
CATCH TO loException
	lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
	DO CASE
	CASE VARTYPE(loWSATLATU)#"O"
		* Handle SOAP error connecting to web service
	CASE !EMPTY(loWSATLATU.FaultCode)
		* Handle SOAP error calling method
		lcErrorMsg=lcErrorMsg+CHR(13)+loWSATLATU.Detail
	OTHERWISE
		* Handle other error
	ENDCASE
	* Use for debugging purposes
	MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
Como mencionó alguien más, verifica si tienes VFP 9 SP 1, a ver si hay un problema de versiones, pero no parece. Esto debería funcionar desde VFP 8 en adelante.

Saludos y suerte,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform