Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use the Microsoft XML HTTP object?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00987584
Message ID:
00988017
Vues:
42
This seems to network/firewall issue. Does the URL work in the browser? Can you ping the machine/IP it is hosted on?

>Jayesh,
>
>Thanks for responding! As far as I know, the URL that i'm trying to reach is not secure (It's http not https) and does not require authentication.
>
>Steve Yeung
>Flushing, NY.
>
>
>Is your URL secure? Does it require any type of authentication?
>
>>Does anyone out there know how to successfully use the Microsoft XML HTTP object to send a request to a web service for processing? I'm trying to send a long string of data to a service that will parse the string and return the parsed results in the form of another long string. The code fails at the point when the object's open() method is called - The response from the server "An error occurred while relaying your request." is returned in a VFP messagebox. I've checked the MSDN online documentation ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceappservices5/html/wce50grfxmlhttpmethods.asp ) for usage and implemented the following code:
>>
>>
>
>
>m.cFileString = 'A,B,C,D, ... ,X,Y,Z'   && Note: This is not the actual
>                                        && string that I'm trying to send.
>
>m.cUrl = 'http://MyServer.com/Mypath/'  && Note: This is not the
>                                        && actual URL to the web
>                                        && service that I'm trying
>                                        && to communicate with.
>
>m.oXmlHttpRequest = createobject("Microsoft.XMLHTTP")
>
>with oXmlHttpRequest
>     .open('POST', m.cUrl, .f.)     && Code fails here?
>     .setRequestHeader("Content_Type", "text/plain")
>     .setRequestHeader("Content-Length", alltrim(str(len(m.cFileString))))
>     .setRequestHeader("Cache-control", "private")
>     .send(m.cFileString)
>     =messagebox(.responseText)
>     =messagebox(.statustext)
>endwith
>
>
>>Any help towards resolving the problem is greatly appreciated. Thanks!
>Jayesh Patel, MCSD
>ePostDirect
>Pearl River, NY.
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform