Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Playing with consuming web services.. what 2 do when (ob
Message
 
 
To
19/08/2003 21:46:32
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00821648
Message ID:
00821653
Views:
17
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform