Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLHTTP calling a method
Message
From
08/05/2008 14:51:11
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01315904
Message ID:
01315932
Views:
21
Ok, but if there are different methods on their server, submitRealtimeRequest being one of them, your code doesn't reference that. How does it know where to get processed?


>>There is a method on the server called submitRealtimeRequest. Using XMLHTTP, is this the correct way to call that method? This returns .NULL. for me, but I'm not sure if it's because the method is never called, or if it is the response from the method.
>>
>>
>>lcXML = lxmlObj.Open("submitRealtimeRequest", TextRequestMessage)
>>
>
>No, it's not the correct way (I'm assuming this is a SOAP call). The actual usage of XMLHTTP is usually:
>
>
>DECLARE Sleep IN WIN32API ;
>         INTEGER nMillisecs
>
>lcURL = "http://www.127.0.0.1/SomePage.asmx/MethodName" && Fill in with your info
>loXML = CREATEOBJECT("MSXML2.XMLHTTP")
>loXML.open("POST", lcURL)
>lcSOAP = "SOAP message here"
>loXML.send(lcSOAP)
>
>DO WHILE loXML.readyState < 4
>   Sleep(100)
>   * Add code for timeout here...
>ENDDO
>
>IF loXML.readyState = 4
>   * Parse response
>   lcResponse = loXML.responseText
>ENDIF
>
>
>Building the soap message is actually a major pain. It seems every platform implements this slightly differently and it usually takes alot of messing around with the format to get it right.
>
>This link may help (or not, depending on whether you're calling a .NET server):
>
>http://support.microsoft.com/kb/893659
>
>I don't have any cookbook style code to help here (I've done this a few different times and hated it every time I needed to get this to work).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform