Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Playing with consuming web services.. what 2 do when (ob
Message
 
 
À
19/08/2003 21:46:32
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00821648
Message ID:
00821653
Vues:
16
This message has been marked as the solution to the initial question of the thread.
Hi Paul,

This service returns a complex data type as XMLDOM object. Try
loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
loWSIQuizService = loWSHandler.SetupClient("http://java.rus.uni-stuttgart.de/quiz/quiz.wsdl", ;
  "QuizService", "IQuizService")
loQ = loWSIQuizService.randomQuestion()
FOR i=0 TO loQ.length-1
	WITH loQ.Item(i)
		? .nodeName, .Text, .xml
	ENDWITH	
ENDFOR
>Playing with consuming web services..I have had several that were very simple work fine then i had one return and object and am stuck. what do I do with the (object) that is returned from the web service?...
>
> LOCAL loWSIQuizService AS "XML Web Service"
>* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
>*__VFPWSDef__: loWSIQuizService = http://java.rus.uni-stuttgart.de/quiz/quiz.wsdl , QuizService , IQuizService
>LOCAL loException, loWSHandler
>*TRY
> loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
> loWSIQuizService = loWSHandler.SetupClient("http://java.rus.uni-stuttgart.de/quiz/quiz.wsdl", "QuizService", "IQuizService")
> * Type your XML Web service code here:
> * ex: leResult = loWSIQuizService.somemethod()
>?leresult
>---(object)
>
> leResult = loWSIQuizService.randomQuestion()
> SET CLASSLIB TO 'wwxml.vcx'
> oXML = CREATEOBJECT("wwXML")
>?oxml.ObjectToXml(leresult)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform