Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I use wwwconnect to query data like this?
Message
From
05/05/2004 09:52:16
 
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Miscellaneous
Thread ID:
00900357
Message ID:
00901167
Views:
15
Hi Rick,

I was able to create a wcServer based on the sample below. When I type the url in the address bar of IE, it returns the xml data.

If I want to get this data from within a VFP application, is wwwClient required? Also, the wwwClient uses HTTPConnect() which requires the domain name or ip address; how do I get my domain name for testing? Is the web ip address the same as my machine's ip address?

Appreciate your help.


>Hi Ramil,
>
>I suspect you can do this with any Windows based Web Development tool.
>
>If you build a Web Connection front end you need to create a method that wraps the COM object call for each of those methods. In WWWC this means you create a Process class and then implement each of these methods.
>
>For example, You'd create a method called GetData and then you can pass in parameters via the QueryString and return the result. It's quite easy to do this:
>
>
>FUNCTION GetData
>
>lcCustId = Request.Querystring("CustId")
>
>o = CREATEOBJECT("YourCom.ComServer")
>lcResult = o.GetData(lcCustId)
>
>*** If you're returing a non HTML result
>Response.ContentTypeHeader("text/xml")
>
>Response.Write( lcResult )
>
>ENDFUNC
>
>
>This sort of thing is just as easy with plain ASP though - and if this is literrally all you want to do I think Web Connection would actually be a bad fit. With ASP.Net you'd use VBScript/JScript to write a page each for each of these method calls.
>
>Web Connection's strength really comes from the richness of the framework in helping you generate output of various kinds using FoxPro inside of the VFP development environment.
>
>Regards,
>
>+++ Rick ---
>
>
>
>>Hi all,
>>
>>We are trying to get a way to extract data using the HTTP transport protocol. Can I use wwwConnect to run my olepublic dlls? Is SOAP required in the process?
>>
>>IIS hosting wwwConnect + myDLL
>>Questions:
>>1. Can I call a method from myDLL as such: oMyDLL.GetData(x)
>>2. Can I use a url as such: http://MyServer/wconnect/wc.dll?GetData=custid
>>
ramil
~~ learning to stand still
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform