Thanks Brian, I'll give it a try now.
At 6/21/2009 08:22 AM, you wrote:
Tony is right: you need a more direct route.
CallHTTP should do the job, if it's a regular querystring or form post.
Seems a bit of a flaky option also, but there you go.. Web service call
might have been better.
Here's a quick example with the relevant pieces (for an explanation see my
blog at mvdeveloper.blogspot.com):
SUBROUTINE TestWebCall(InData, OutData, ErrText)
EQU IN.URL To 1
EQU IN.QUERYSTRING TO 2
EQU IN.METHOD TO 3
EQU IN.PROXY TO 4
EQU IN.POSTVARS To 5
EQU IN.POSTVALUES TO 6
EQU IN.HTTPVERSION To 7
EQU IN.HTTPHEADER To 8
EQU IN.HTTPVALUES To 9
EQU OUT.STATUS To 1
EQU OUT.HEADER To 2
EQU OUT.DATA To 3
EQU HTTP_SUCCESS TO 0
OutData = ''
ErrText = ''
If InData<IN.HTTPVERSION> = "" Then
InData<IN.HTTPVERSION> = "1.0"
End
Ok = setHTTPDefault("VERSION", InData<IN.HTTPVERSION>)
Ok = setHTTPDefault("PROXY_NAME", InData<IN.PROXY>)
Path = InData<IN.URL>
If InData<IN.QUERYSTRING> <> "" Then
Path := "?" : InData<IN.QUERYSTRING>
End
Method = InData<IN.METHOD>
If Method = '' Then
Method = 'GET'
End
Ok = createRequest(Path, Method, hRequest)
If Ok <> HTTP_SUCCESS Then
ErrText = "Error creating HTTP Request (":Ok:")"
RETURN
End
--- snip -- snip -- snip ---
* Send request
PostData = '' ;* set above
DEF_TIMEOUT = 60000
ResponseHeader = ''
ResponseData = ''
Ok = submitRequest(hRequest, DEF_TIMEOUT, PostData, ResponseHeader,
ResponseData, HTTPStatus)
If Ok <> HTTP_SUCCESS Then
ErrText = "Error submitting request (": Ok:")"
RETURN
End
OutData<OUT.STATUS> = HTTPStatus
OutData<OUT.HEADER> =Convert(@FM,@VM, ResponseHeader)
OutData<OUT.DATA> = Convert(@FM, @VM, ResponseData)
RETURN
Brian
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: 21 June 2009 11:52
> To: [email protected]
> Subject: [U2] uvRunCommand
>
> The example is just a test. Both servers are trusted servers.
> I run both of them. The end result will update a Product SQL
> table on a web server in a data center with current product
> pricing as the user updates his local UV database. I tried
> 1st with Call.http. There are few examples that google can
> find and none that show what I am trying to do. Call.http was
> my 1st try. Can you post a simple example that sends a url
> with a query string and gets the result page back so my UV
> basic program can know the price was updated ok please.
>
> thanks
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4174 (20090620) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
Curt Lashley
2803 North Boulevard
Tampa, FL 33602
Cell: (813) 293-2878 or (800) 886-2878
Home: (813) 226-2878 or (800) 524-2878
Fax: (813) 229-2878
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users