Hi
I am actually testing how to use web services using VFP8.
I have written a sample code (see below) to consume the web service on the
link below:
http://www.webservicex.net/WS/WSDetails.aspx?CATID=12&WSID=64
---------------------------------------------------------------------------------------------------------
LOCAL oWS AS "XML Web Service"
LOCAL loGeoIP
TRY
oWS = CREATEOBJECT("MSSOAP.SoapClient")
oWS.MSSoapInit("http://www.webservicex.net/geoipservice.asmx?WSDL")
loGeoIP = oWS.GetGeoIPContext()
CATCH TO oErr
MESSAGEBOX(oErr.Message)
ENDTRY
IF VARTYPE(oWS) = "O"
RELEASE oWS
ENDIF
---------------------------------------------------------------------------------------------------------
The method GetGeoIPContext() return a complextype GeoIP.
Below is the GeoIP extract portion from the WSDL file.
- <s:complexType name="GeoIP">
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="ReturnCode" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="IP" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ReturnCodeDetails"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="CountryName" type="s:string"
/>
<s:element minOccurs="0" maxOccurs="1" name="CountryCode" type="s:string"
/>
</s:sequence>
</s:complexType>
Does anyone know how to extract the complextype data in VFP8?
Appreciate your help.
Tham