[U2] callHTTP creating Header for Host,

2012-08-22 Thread regalitare
Greetings

I am working on an issue with UniData but I suspect it possibly affects both 
flavors.  I am making a callHTTP GET request to a server that has virtual 
hosts.  Basically, one server on a single IP address has multiple named web 
sites.  On UniData 7.3.0 Personal Edition on Windows I tested my code and it 
works fine.  On UniData 7.2.10 on Windows it came up with the default web 
site (same as if I just use the IP address instead of the FQDN) instead of mine 
that was named in the URL.  I suspected the Host header that is required to 
be sent for HTTP/1.1 protocol might be missing on UniData 7.2.

So, I added this line to the code to set the header:

CMD.STATUS = setRequestHeader(RHANDLE,Host,HOST.AND.PORT)

And voila!  On 7.2 it started working properly!  But it broke 7.3!  On 7.3 it 
brings up the default web site if I explicitly set that header.

Is this a known bug/issue?  Is there something I should do to work around it 
now so that a UniData upgrade won't bite me?  I've thought about reverting to 
the old socket interface but I'd like to use callHTTP if it is stable since 
it is so convenient.

Thanks,

Steve...

--
Steve Kneizys

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP creating Header (Karl-Heinz Winter)

2011-08-25 Thread Karl-Heinz Winter

I found the solution by myself!

The problem could be, that the functions 'setRequestHeader' und 
addRequestParameter' are formatting the data in any way, that the 
webserver doesn`t understand the request. When I logged the outgoing 
traffic to port 80, I have seen valuemarks in the header information.


On Pickwiki there is a good example of calling a web service: 
http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTP. The second example 
shows how to do a request with OPENSOCKET, WRITESOCKET and READSOCKET. 
These classes are posting the data without any change.


I tried it and the webserver response ist OK!

Karl-Heinz

old message was:
Message: 1 Date: Tue, 23 Aug 2011 21:03:31 +0200 From: Karl-Heinz Winter 
karl-heinz.win...@freenet.de To: u2-users@listserver.u2ug.org Subject: 
[U2] callHTTP creating Header Message-ID: 4e53f983.10...@freenet.de 
Content-Type: text/plain; charset=ISO-8859-15; format=flowed in a header 
with post-data I have to create the header-information like this: 
Content-type: text/xml;charset=UTF-8 Accept: text/xml, 
multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 
When creating it with setRequestHeader or with addRequestParamete I 
will receive the error 415 (Unsupported media type) from the server. How 
can I create the correct header? Thanks in advance Karl-Heinz














___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP creating Header (Karl-Heinz Winter)

2011-08-25 Thread Tony Gravagno
Karl - your original request said:
How can I create the correct header?

My mental response was stop bothering with CallHTTP and use
cURL.  I refrained from posting that because of the inevitable
retribution from people who prefer to bang their heads against
flaky software rather than just looking outside of the box for a
real solution.  ( oh he is sooo asking for it...)

But now that you've moved from CallHTTP to sockets. Mein Gott,
Mann! Nein Nein! Tun Sie nicht das!  Sockets are much lower-level
than what you need to do HTTP calls.

If you have a good solution to your problem, OK, sockets are
great for doing many things.  And it's nice if you found free
code that does exactly what you need.  But if you don't actually
need complex software at that level, then for maintainability
later, you should consider a higher-level solution.  Well, that's
my opinion anyway - use the right tools for the job, and all
that...

Viel Erfolg!
T


 From: Karl-Heinz Winter
 The second example shows how to do a request with 
 OPENSOCKET, WRITESOCKET and READSOCKET. These classes 
 are posting the data without any change.
 
 I tried it and the webserver response ist OK!

 When creating it with setRequestHeader or with 
 addRequestParamete I will receive the error 415 
 (Unsupported media type) from the server. How can I 
 create the correct header?

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP creating Header

2011-08-25 Thread Boydell, Stuart
Karl,
I have used both setrequestheader and addrequestparameter without issues.

Add 3 parameters using AddRequestParameter:
   sub httpPostXML
   h = '';rh = '';rd = '';rs = '';sh = ''; pd = ''; sch = '';cf=''
   URL = 'http://myuri'
   boundary = '--':system(99)
   z = createRequest(URL,'POST:multipart/form-data; boundary=':boundary,h)
   z = addRequestParameter(h,'user_id','999','Content-Disposition: 
form-data; name=user_id')
   z = addRequestParameter(h,'pwd','*pa55*','Content-Disposition: form-data; 
name=pwd')
   ct = 'Content-Disposition: form-data; name=invoice_xml; 
filename=test.xml':@am:'Content-Type: text/xml'
   cv = '?xml version=1.0 encoding=UTF-8?!DOCTYPE cXML SYSTEM 
http://xml.cXML.org/schemas/cXML/1.2.009/InvoiceDetail.dtd;cXML  etc'
   if not(addRequestParameter(h,'invoice_xml',cv,ct)) then
  crt 'status :': submitRequest(h,25000,pd,rh,rd,rs)
  crt 'headers:':rh
  crt 'data   :':rd
  crt 'httpstatus :':rs
   end


Add a request header (content is compressed) using SetRequestHeader:
  hn = 'Content-Encoding'
  hv = 'gzip'
  z  = setRequestHeader(httpHandle,hn,hv)


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno
Sent: Friday, 26 August 2011 08:53
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] callHTTP creating Header (Karl-Heinz Winter)

Karl - your original request said:
How can I create the correct header?

My mental response was stop bothering with CallHTTP and use cURL.  I 
refrained from posting that because of the inevitable retribution from people 
who prefer to bang their heads against flaky software rather than just looking 
outside of the box for a real solution.  ( oh he is sooo asking for it...)

But now that you've moved from CallHTTP to sockets. Mein Gott, Mann! Nein Nein! 
Tun Sie nicht das!  Sockets are much lower-level than what you need to do HTTP 
calls.

If you have a good solution to your problem, OK, sockets are great for doing 
many things.  And it's nice if you found free code that does exactly what you 
need.  But if you don't actually need complex software at that level, then for 
maintainability later, you should consider a higher-level solution.  Well, 
that's my opinion anyway - use the right tools for the job, and all that...

Viel Erfolg!
T


 From: Karl-Heinz Winter
 The second example shows how to do a request with OPENSOCKET, 
 WRITESOCKET and READSOCKET. These classes are posting the data without 
 any change.
 
 I tried it and the webserver response ist OK!

 When creating it with setRequestHeader or with addRequestParamete 
 I will receive the error 415 (Unsupported media type) from the 
 server. How can I create the correct header?

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP creating Header

2011-08-24 Thread Glenn Sallis

Hello Karl-Heinz,

It could be that the issue is not with UniVerse, rather at the web 
server end. If you can share the source code with us which you are using 
to build up the request this may help us to trace the problem. Also, are 
you running UniVerse or UniData and on which OS?


I would suggest turning on protocol logging which should help in 
locating the cause of the problem. To do this use the protocolLogging() 
function which requires three parameters

1. The name of the file to which you want to save the logs.
2. ON
3. 10 (level 10 should give you enough info to help you with debugging).

The function returns true or false depending on whether or not logging 
has started successfully.


Other than that, try searching the mailing list. I would bet that you 
are not the only one who has had this problem. Otherwise check the BASIC 
Extensions documentation at the Rocket website.


Mit freundlichen Grüßen

Glenn Sallis
Glenn Sallis Softwareentwicklung und Beratung



Am 23.08.2011 21:03, schrieb Karl-Heinz Winter:
in a header with post-data I have to create the header-information 
like this:


Content-type: text/xml;charset=UTF-8
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, 
*; q=.2, */*; q=.2


When creating it with setRequestHeader or with addRequestParamete 
I will receive the error 415 (Unsupported media type) from the server. 
How can I create the correct header?


Thanks in advance
Karl-Heinz

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] callHTTP creating Header

2011-08-23 Thread Karl-Heinz Winter
in a header with post-data I have to create the header-information like 
this:


Content-type: text/xml;charset=UTF-8
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, 
*; q=.2, */*; q=.2


When creating it with setRequestHeader or with addRequestParamete I 
will receive the error 415 (Unsupported media type) from the server. How 
can I create the correct header?


Thanks in advance
Karl-Heinz

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-03 Thread Kevin King
The Connection: close header had zero impact.  Checking other Apache
configuration options now.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-03 Thread Glen Batchelor

 You can always run apache in debug mode (-X) as a single process and run it
under strace to see what's going on.


Glen Batchelor
IT Director
All-Spec Industries
 phone: (910) 332-0424
   fax: (910) 763-5664
E-mail: webmas...@all-spec.com
   Web: http://www.all-spec.com
  Blog: http://blog.all-spec.com


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Kevin King
 Sent: Thursday, September 03, 2009 11:17 AM
 To: U2 Users List
 Subject: Re: [U2] callHTTP - disconnect?
 
 The Connection: close header had zero impact.  Checking other Apache
 configuration options now.
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-03 Thread Symeon Breen
Actually TIME_WAIT is normal - when you close a connection, it goes to
timewait for a set amount of time and then is closed, this stops any delayed
packets being accepted by a later connection. There are kernel/tcp params to
determine how long it should be in timewait. If you have too many at
timewait this is called TIME_WAIT loading and can have implications on
server performance as each of these has a memory stack.




-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 02 September 2009 19:07
To: U2 Users List
Subject: [U2] callHTTP - disconnect?

I have a Unidata (6.1/AIX) program using the callHTTP API to move data out
to an Apache server on a transaction by transaction basis.  When the
transactions get dropped into the queue slowly all is well.  When the
transactions get flooded in, Apache gets overwhelmed.  It appears like
Unidata isn't sending a disconnect after the submitRequest because the
TIME_WAIT in netstat is showing excessively long disconnect times for these
connections.  I don't see anything in the API documentation that mentions
disconnecting from the Unidata side; is there a header or option that I can
set to make sure Unidata sends a disconnect after the request?

-Kevin
http://www.PrecisOnline.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-03 Thread Kevin King
On Thu, Sep 3, 2009 at 10:10 AM, Symeon Breen syme...@gmail.com wrote:

 Actually TIME_WAIT is normal - when you close a connection, it goes to
 timewait for a set amount of time and then is closed, this stops any
 delayed
 packets being accepted by a later connection. There are kernel/tcp params
 to
 determine how long it should be in timewait. If you have too many at
 timewait this is called TIME_WAIT loading and can have implications on
 server performance as each of these has a memory stack.


Yeah, I know it's normal, but when we get a couple hundred of these out here
we usually get a comparable number of httpd children and the server just
stops accepting new connections.  We have only one Unidata instance sending
these things so there shouldn't be any reason why the Apache server would
stop allowing connections if each one gets disconnected in a timely manner.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] callHTTP - disconnect?

2009-09-02 Thread Kevin King
I have a Unidata (6.1/AIX) program using the callHTTP API to move data out
to an Apache server on a transaction by transaction basis.  When the
transactions get dropped into the queue slowly all is well.  When the
transactions get flooded in, Apache gets overwhelmed.  It appears like
Unidata isn't sending a disconnect after the submitRequest because the
TIME_WAIT in netstat is showing excessively long disconnect times for these
connections.  I don't see anything in the API documentation that mentions
disconnecting from the Unidata side; is there a header or option that I can
set to make sure Unidata sends a disconnect after the request?

-Kevin
http://www.PrecisOnline.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-02 Thread Glen Batchelor

 I don't suppose it's keep-alives going bad?


Glen Batchelor
IT Director
All-Spec Industries
 phone: (910) 332-0424
   fax: (910) 763-5664
E-mail: webmas...@all-spec.com
   Web: http://www.all-spec.com
  Blog: http://blog.all-spec.com


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Kevin King
 Sent: Wednesday, September 02, 2009 2:07 PM
 To: U2 Users List
 Subject: [U2] callHTTP - disconnect?
 
 I have a Unidata (6.1/AIX) program using the callHTTP API to move data out
 to an Apache server on a transaction by transaction basis.  When the
 transactions get dropped into the queue slowly all is well.  When the
 transactions get flooded in, Apache gets overwhelmed.  It appears like
 Unidata isn't sending a disconnect after the submitRequest because the
 TIME_WAIT in netstat is showing excessively long disconnect times for
 these
 connections.  I don't see anything in the API documentation that mentions
 disconnecting from the Unidata side; is there a header or option that I
 can
 set to make sure Unidata sends a disconnect after the request?
 
 -Kevin
 http://www.PrecisOnline.com
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] callHTTP - disconnect?

2009-09-02 Thread Symeon Breen
In your apache app set the http response header 'Connection' to 'Close'




-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 02 September 2009 19:07
To: U2 Users List
Subject: [U2] callHTTP - disconnect?

I have a Unidata (6.1/AIX) program using the callHTTP API to move data out
to an Apache server on a transaction by transaction basis.  When the
transactions get dropped into the queue slowly all is well.  When the
transactions get flooded in, Apache gets overwhelmed.  It appears like
Unidata isn't sending a disconnect after the submitRequest because the
TIME_WAIT in netstat is showing excessively long disconnect times for these
connections.  I don't see anything in the API documentation that mentions
disconnecting from the Unidata side; is there a header or option that I can
set to make sure Unidata sends a disconnect after the request?

-Kevin
http://www.PrecisOnline.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


RE: [U2] CallHTTP vs cURL...

2009-04-19 Thread Tony G
David, buried in my point was that you may be able to get other
phantoms to be more effective, thus reducing your requirement for
phantoms for other tasks.  So with luck, when you do need a new
one for CallHTTP your total phantom usage won't be any more than
it is now.  Like anything, especially in this economy, eliminate
existing waste before attempting to avoid new expenses.

But be careful about making your existing ports more effective.
In it's strictest technical sense IBM licensing would prohibit
even these sorts of optimizations - have your lawyers do lunch
with their lawyers...

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com

Visit PickWiki.com.   Contribute!

 From: David Wolverton 
 BUT -- right now, regardless of how it gets executed, 
 using CallHTTP (or anything 'socket') would go 
 iPhantom, even if just for a moment on a 'called' or 
 'executed' sub-sub-phantom -- and if there are no 
 seats free for the phantom to 'grab' then it's dead in 
 the water...
 
 The issue isn't the 'method' used to execute CallHTTP 
 - it's the CallHTTP wanting to grab a seat that is the 
 issue.
 
 Thanks!
 David W. 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-18 Thread Ross Ferris
If only 5-6 times a day, why not just kill logoff the existing phantom,
immediately after spawning a replacement immediately after the CallHTTP
-- I assume new process would initialize what it needs to, and start
over, so you would have an iPhantom issue for a second or 2 at most.

The other more interesting grab for money is the question of What
constitutes a connection pool, as IBM have been chasing this chestnut
here in Australia recently.

Situations we haven't received an un-ambiguous answer for to date
include polling files deposited by, say, an external POS register,
inter-acting with time clocks or even processing emails  attachments.
Until recently I thought these kind of interactions were relatively
innocuous  AOK, but it now a murky mess

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
us...@listserver.u2ug.org] On Behalf Of David Wolverton
Sent: Saturday, 18 April 2009 3:01 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] CallHTTP vs cURL...

It's situational, so it would be tough to execute via 'cron' - it has
to
execute or at least be 'triggered' from 'within' the phantom with data
the
phantom provides -- I guess I could write a Scheduled process that runs
every  6 seconds to see if there is a 'file to execute' - but that
seems
to
be even more overhead -- I'm just trying to figure out how to avoid
turning
the phantom into an iPhantom... And losing a valuable 'real' seat in
the
process!

 -Original Message-
 From: owner-u2-us...@listserver.u2ug.org
 [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Jeff Schasny
 Sent: Friday, April 17, 2009 11:44 AM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] CallHTTP vs cURL...

 How about running a shell script from a cron job that
 retrieves whatever via cURL.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-18 Thread Tony G
Responding in general to a few notes here.
[AD] follows code and comments.

As to phantom operations, I find it surprising that most sites
don't use a plugin process, where you have a single phantom that
loops to process any tasks that are required.  It's like a
checkout person at the store, the same person will ring up
whatever you bring to the counter, you don't have one person to
ring up milk, another one for butter...  You provide the required
operations through a polled file.  For example:

LOOP
  NOTASKS=0
  SELECT TASKS  
  LOOP
READNEXT TASKID ELSE NOTASKS=1
  UNTIL NOTASKS DO
READ TASK FROM TASKS,TASKID THEN
  BEGIN CASE
CASE TASK1=CALL WEB SERVICE
  CALL WEBSERVICE.CLIENT(TASK)
CASE TASK1=SYNC OUTLOOK WITH CUSTFILE
  CALL SYNC.OUTLOOK(TASK)
CASE TASK1=RUN DAY END REPORTS
  CALL DAY.END(TASK)
CALL TASK1=RESET PHANTOM
  DONE=1
CASE 1
  CALL INVALID.PHANTOM.REQUEST(TASK)
  END CASE
END ELSE NULL
  REPEAT
  * Refresh phantoms every 10 hours
  IF TIME() START.TIME+600 THEN DONE=1
UNTIL DONE DO REPEAT
EXECUTE START.NEW.PHANTOM ; * kick off a replacement
END

Each of those subroutines can process in-line if they are
guaranteed to be short-lived, or they can kick off other phantoms
to handle more lengthy tasks or certain categories of tasks (as
with checkout people at a department store who ring up clothes,
tools, etc).  The idea here is that you may not need to start a
license-consuming phantom to do every task Now, but by deferring
the task for a few seconds you can do a lot with just one
process.

Each process is also responsible for removing the task from the
queue.  If that's not done some other process will get it.  If
you have more than one of these processes running to get the same
category of tasks, you'll need to ensure there are no contentions
and that tasks aren't dropped.

That whole process could be simplified with something like this:
  PROG=TASK1
  CALL @PROG(TASK)
That opens many possibilities but isn't perfect for all
situations either.

For the [AD]: Many people want to call external web pages or web
services, and turn to tools like CallHTTP and cURL.  I use cURL a
lot myself, but if you need to create structured requests or
parse the responses then you have a lot of work to do,
particularly with XML.  Most people don't know that mv.NET can be
used to call a web service remote from MV, and return results
with no protocol-related formatting whatsoever.  You just write
an item to a file and read back the results.  I won't get into
another technical HowTo here but this solution does consume a U2
license and may not be suitable for all applications.  If you
already have mv.NET then you can call a web service from BASIC
very easily at no extra cost.  If you don't have mv.NET, let me
know.

For people wondering why should I buy a tool when I have free
tools in U2, just think about how many tools you use to solve
different problems.  Then think about how many times you've seen
me say you can do that with mv.NET.  It's one tool, in many
ways better than the free tools - isn't that better than going
through the learning curve for a new tool every time you want to
do something different?  People also think anything other than
free is expensive.  mv.NET licenses are only a few hundred
dollars - much less than the cost of developing almost any of
these free solutions on your own.  Feel free to contact me for
estimates.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula RD sells mv.NET and other Pick/MultiValue products
worldwide, and provides related development services
nospamNebula-RnD.com/blog
nospamNebula-RnD.com/forum

Use PickWiki.com!  Contribute!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-18 Thread David Wolverton
BUT -- right now, regardless of how it gets executed, using CallHTTP (or
anything 'socket') would go iPhantom, even if just for a moment on a
'called' or 'executed' sub-sub-phantom -- and if there are no seats free for
the phantom to 'grab' then it's dead in the water...

The issue isn't the 'method' used to execute CallHTTP - it's the CallHTTP
wanting to grab a seat that is the issue.

Thanks!
David W. 

 -Original Message-
 From: owner-u2-us...@listserver.u2ug.org 
 [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Jeff Butera
 Sent: Saturday, April 18, 2009 7:39 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] CallHTTP vs cURL...
 
 On Sat, 18 Apr 2009, Tony G wrote:
 
  As to phantom operations, I find it surprising that most 
 sites don't 
  use a plugin process, where you have a single phantom that loops to 
  process any tasks that are required.
 
 Ding, ding - I'm with Tony.I've long used what Tony 
 mentions here. 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP vs cURL...

2009-04-18 Thread Bill Haskett
   Tony:
   I have a simple master phantom service that runs and does exactly what you
   say.  It starts when the UD dbms machine is booted and checks a service file
   for specific information.  This service file contains various things the
   service needs to know like:
   Command = sort
   DTASERVICES
18:36:05 Apr 18 2009
   Service Dbms Acct...ACCOUNT...
   COMMAND(S) OK Cron Schedule..
   BACKUP   RUN DTABP
   DM.FS 0 45 23 * * *
   CABFTPE:\DataTrust\Demo  RUN DTABP
   TRINFO.CAB FTP0 55 23 * * 6
   LICENSE.CNT   E:\DataTrust\Demo  RUN DTABP
   LICENSE.CHECK 0 15 * * * *
   CLEANUP  ASI  E:\Advantos\Intel  RUN DTABP
   CLEANUP.DAILY 1 00 22 * * *
   CLEANUP  DEMO E:\DataTrust\Demo  RUN DTABP
   CLEANUP.DAILY 1 00 22 * * *
   CLEANUP  DEV  E:\DataTrust\Dev   RUN DTABP
   CLEANUP.DAILY 1 00 22 * * *
   6 records listed
   It runs all kinds of stuff including firing off sftp uploads/downloads,
   backups, etc.
   I'd be happy to publish this if anyone's interested.
   Bill
   __

   From: Tony G 1tlx6h...@sneakemail.com
   Sent: 4/18/2009 1:23 PM
   To: u2-users@listserver.u2ug.org
   Subject: Re: [U2] CallHTTP vs cURL...

Responding in general to a few notes here.
[AD] follows code and comments.

As to phantom operations, I find it surprising that most sites
don't use a plugin process, where you have a single phantom that
loops to process any tasks that are required.  It's like a
checkout person at the store, the same person will ring up
whatever you bring to the counter, you don't have one person to
ring up milk, another one for butter...  You provide the required
operations through a polled file.  For example:

LOOP
  NOTASKS=0
  SELECT TASKS
  LOOP
READNEXT TASKID ELSE NOTASKS=1
  UNTIL NOTASKS DO
READ TASK FROM TASKS,TASKID THEN
  BEGIN CASE
CASE TASK1=CALL WEB SERVICE
  CALL WEBSERVICE.CLIENT(TASK)
CASE TASK1=SYNC OUTLOOK WITH CUSTFILE
  CALL SYNC.OUTLOOK(TASK)
CASE TASK1=RUN DAY END REPORTS
  CALL DAY.END(TASK)
CALL TASK1=RESET PHANTOM
  DONE=1
CASE 1
  CALL INVALID.PHANTOM.REQUEST(TASK)
  END CASE
END ELSE NULL
  REPEAT
  * Refresh phantoms every 10 hours
  IF TIME() START.TIME+600 THEN DONE=1
UNTIL DONE DO REPEAT
EXECUTE START.NEW.PHANTOM ; * kick off a replacement
END

Each of those subroutines can process in-line if they are
guaranteed to be short-lived, or they can kick off other phantoms
to handle more lengthy tasks or certain categories of tasks (as
with checkout people at a department store who ring up clothes,
tools, etc).  The idea here is that you may not need to start a
license-consuming phantom to do every task Now, but by deferring
the task for a few seconds you can do a lot with just one
process.

Each process is also responsible for removing the task from the
queue.  If that's not done some other process will get it.  If
you have more than one of these processes running to get the same
category of tasks, you'll need to ensure there are no contentions
and that tasks aren't dropped.

That whole process could be simplified with something like this:
  PROG=TASK1
  CALL @PROG(TASK)
That opens many possibilities but isn't perfect for all
situations either.

For the [AD]: Many people want to call external web pages or web
services, and turn to tools like CallHTTP and cURL.  I use cURL a
lot myself, but if you need to create structured requests or
parse the responses then you have a lot of work to do,
particularly with XML.  Most people don't know that mv.NET can be
used to call a web service remote from MV, and return results
with no protocol-related formatting whatsoever.  You just write
an item to a file and read back the results.  I won't get into
another technical HowTo here but this solution does consume a U2
license and may not be suitable for all applications.  If you
already have mv.NET then you can call a web service from BASIC
very easily at no extra cost.  If you don't have mv.NET, let me
know.

For people wondering why should I buy a tool when I have free
tools in U2, just think about how many tools you use to solve
different problems.  Then think about how many times you've seen
me say you can do that with mv.NET.  It's one tool, in many
ways better than the free tools - isn't that better than going
through the learning curve for a new tool every time you want to
do something different?  People also think anything other than
free is expensive.  mv.NET licenses are only a few hundred
dollars - much less than the cost of developing almost any of
these free solutions on your own

[U2] CallHTTP vs cURL...

2009-04-17 Thread David Wolverton
I have a phantom that does a CallHTTP to 'call back' to our RedBack server
to run a Java Method that returns some data.  Essentially, it's doing a
'data read' - but with IBM's new 'drive for revenue', this command now makes
the Phantom into an iPhantom -- which defeats the reason we made it a
phantom in the first place!  It's a background 'monitor' process yet now
it's sucking up a 'full pay' seat...

This CallHTTP is done 3 - 5x a day - but once it execute, the seat is then
gone until the phantom dies. 

This is just plain wrong -- if I could read this data locally, I would - but
since I cannot... I'm trying to weigh options on how to 'work around' this
issue and thought I'd see what others have done.

1) I could have the phantom 'PHANTOM' out another process to do ONLY the
CallHTTP, write the answer to a local 'file' and then 'die' - the first
phantom would just 'watch' that file for the result.  The only downside,
we'd have to have a 'free seat' for the 3x a day it runs, and that's not
always going to be true. Hence the problem in the first place!

2) Find a way to 'trick' the application - like EXECUTE !cURL... -- has
anyone done this inside of a phantom? Does it work?  More importantly, does
it go iPhantom in the process?

I'm sort of perplexed on the iPhantom thing -- CallHTTP is just another way
to 'read data' from somewhere. I'm just not sure why they decided this
should ding a license. I could see if it was SERVING data - but CallHTTP is
'getting' data - not 'serving' it...  It just is an odd decision. If we were
opening a socket for read/write, again, I could *sort of* understand making
it iPhantom - but can CallHTTP really do 'server' work??

Thanks for any thoughts ... It's only $500, but it's the principle of the
thing here!! I'm trying to do something that to me LEGITIMATELY should not
consume a seat.

David W.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP vs cURL...

2009-04-17 Thread Jeff Schasny
How about running a shell script from a cron job that retrieves whatever 
via cURL.

David Wolverton wrote:
 I have a phantom that does a CallHTTP to 'call back' to our RedBack server
 to run a Java Method that returns some data.  Essentially, it's doing a
 'data read' - but with IBM's new 'drive for revenue', this command now makes
 the Phantom into an iPhantom -- which defeats the reason we made it a
 phantom in the first place!  It's a background 'monitor' process yet now
 it's sucking up a 'full pay' seat...

 This CallHTTP is done 3 - 5x a day - but once it execute, the seat is then
 gone until the phantom dies. 

 This is just plain wrong -- if I could read this data locally, I would - but
 since I cannot... I'm trying to weigh options on how to 'work around' this
 issue and thought I'd see what others have done.

 1) I could have the phantom 'PHANTOM' out another process to do ONLY the
 CallHTTP, write the answer to a local 'file' and then 'die' - the first
 phantom would just 'watch' that file for the result.  The only downside,
 we'd have to have a 'free seat' for the 3x a day it runs, and that's not
 always going to be true. Hence the problem in the first place!

 2) Find a way to 'trick' the application - like EXECUTE !cURL... -- has
 anyone done this inside of a phantom? Does it work?  More importantly, does
 it go iPhantom in the process?

 I'm sort of perplexed on the iPhantom thing -- CallHTTP is just another way
 to 'read data' from somewhere. I'm just not sure why they decided this
 should ding a license. I could see if it was SERVING data - but CallHTTP is
 'getting' data - not 'serving' it...  It just is an odd decision. If we were
 opening a socket for read/write, again, I could *sort of* understand making
 it iPhantom - but can CallHTTP really do 'server' work??

 Thanks for any thoughts ... It's only $500, but it's the principle of the
 thing here!! I'm trying to do something that to me LEGITIMATELY should not
 consume a seat.

 David W.
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/

   

-- 

Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-17 Thread Glen Batchelor
  I utilize cURL for shipping tracking updates, among other automated tasks,
that run bi-hourly. Since the data is not critical, I don't perform any
connectivity or results checking. If you do decide to shell a cURL process,
make sure that you verify the response is well-formed. You will need to
implement the timeout switch too. Your better off putting raw data into a
wrapper of some kind so that you can verify the start/end of the
transaction(formation checking). I've seen cURL dump only the first 2-3
lines of an entire XML document back to me without complaining about
connection errors. Timeout handling should also be done, so if your current
CallHTTP code doesn't do all of that then you have some design work to do.


Glen Batchelor
IT Director
All-Spec Industries
 phone: (910) 332-0424
   fax: (910) 763-5664
E-mail: webmas...@all-spec.com
   Web: http://www.all-spec.com
  Blog: http://blog.all-spec.com


 -Original Message-
 From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
 us...@listserver.u2ug.org] On Behalf Of David Wolverton
 Sent: Friday, April 17, 2009 1:01 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] CallHTTP vs cURL...
 
 It's situational, so it would be tough to execute via 'cron' - it has to
 execute or at least be 'triggered' from 'within' the phantom with data the
 phantom provides -- I guess I could write a Scheduled process that runs
 every  6 seconds to see if there is a 'file to execute' - but that seems
 to
 be even more overhead -- I'm just trying to figure out how to avoid
 turning
 the phantom into an iPhantom... And losing a valuable 'real' seat in the
 process!
 
  -Original Message-
  From: owner-u2-us...@listserver.u2ug.org
  [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Jeff Schasny
  Sent: Friday, April 17, 2009 11:44 AM
  To: u2-users@listserver.u2ug.org
  Subject: Re: [U2] CallHTTP vs cURL...
 
  How about running a shell script from a cron job that
  retrieves whatever via cURL.
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-17 Thread George Gallen
I use wget (unix).

create dirlink - a directory link (1F 2/directory 3D_SOURCE)
execute 'sh -c cd directory ; wget -O outfile URL'
ed dirlink outfile

Make outfile, the PID/USERNO for uniqueness and multiuser ability

George

 -Original Message-
 From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
 us...@listserver.u2ug.org] On Behalf Of Jeff Schasny
 Sent: Friday, April 17, 2009 12:44 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] CallHTTP vs cURL...

 How about running a shell script from a cron job that retrieves
 whatever
 via cURL.

 David Wolverton wrote:
  I have a phantom that does a CallHTTP to 'call back' to our RedBack
 server
  to run a Java Method that returns some data.  Essentially, it's doing
 a
  'data read' - but with IBM's new 'drive for revenue', this command
 now makes
  the Phantom into an iPhantom -- which defeats the reason we made it a
  phantom in the first place!  It's a background 'monitor' process yet
 now
  it's sucking up a 'full pay' seat...
 
  This CallHTTP is done 3 - 5x a day - but once it execute, the seat is
 then
  gone until the phantom dies.
 
  This is just plain wrong -- if I could read this data locally, I
 would - but
  since I cannot... I'm trying to weigh options on how to 'work around'
 this
  issue and thought I'd see what others have done.
 
  1) I could have the phantom 'PHANTOM' out another process to do ONLY
 the
  CallHTTP, write the answer to a local 'file' and then 'die' - the
 first
  phantom would just 'watch' that file for the result.  The only
 downside,
  we'd have to have a 'free seat' for the 3x a day it runs, and that's
 not
  always going to be true. Hence the problem in the first place!
 
  2) Find a way to 'trick' the application - like EXECUTE !cURL... --
 has
  anyone done this inside of a phantom? Does it work?  More
 importantly, does
  it go iPhantom in the process?
 
  I'm sort of perplexed on the iPhantom thing -- CallHTTP is just
 another way
  to 'read data' from somewhere. I'm just not sure why they decided
 this
  should ding a license. I could see if it was SERVING data - but
 CallHTTP is
  'getting' data - not 'serving' it...  It just is an odd decision. If
 we were
  opening a socket for read/write, again, I could *sort of* understand
 making
  it iPhantom - but can CallHTTP really do 'server' work??
 
  Thanks for any thoughts ... It's only $500, but it's the principle of
 the
  thing here!! I'm trying to do something that to me LEGITIMATELY
 should not
  consume a seat.
 
  David W.
  ---
  u2-users mailing list
  u2-users@listserver.u2ug.org
  To unsubscribe please visit http://listserver.u2ug.org/
 
 

 --
 ---
 -
 Jeff Schasny - Denver, Co, USA
 jschasny at gmail dot com
 ---
 -
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-17 Thread John Hester
 -Original Message-
 From: owner-u2-us...@listserver.u2ug.org 
 [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of 
 David Wolverton
 Sent: Friday, April 17, 2009 8:12 AM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] CallHTTP vs cURL...

[snip]

 2) Find a way to 'trick' the application - like EXECUTE 
 !cURL... -- has
 anyone done this inside of a phantom? Does it work?  More 
 importantly, does
 it go iPhantom in the process?

Like Glen, we also use cURL for shipping rates and address validation
with UPS and Fedex web services.  We haven't had issues with missing
data, but have with timeouts.  If you don't tell cURL to time out, it
will wait for a response for a very lng time.  Very bad when the
whole order desk is hung due to UPS or Fedex having a problem with their
site.  We learned that one the hard way.  This is what we execute now:

EXECUTE 'SH -c curl --connect-timeout 10 --max-time 10 -d
@/tmp/':REQ.ID:' -k ':URL:'', OUT  XML.TXT

The XML request is written to a sequential temp file, then deleted after
the execute.  The curl calls are made from user or UOJ sessions, so I
can't say with certainty if there is any affect on the phantom
licensing.

-John
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP vs cURL...

2009-04-17 Thread Symeon Breen
I have used EXECUTE !curl ... in  a number of  apps and it definitely does
not take an iphantom licence.

However i use it not to get round licencing (as this is usually from a
uniobjects call anyway) but because for some reason curl is many times more
efficient than callhttp. I presume the udt process has to load some library
to run the callhttp, whereas the execute is just the normal *nix process
spawn overhead. Anyway we did it as we had occurrences of the callhttp
taking say 6 or 7 hundred milliseconds but the execute curl took 2 or 3
hundred and in a very heavily used web service (between 5 and 50 calls per
second) this adds up to quite a difference.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] callHTTP using a Proxy Server

2007-01-25 Thread Mike Dallaire
UniVerse 10.1

SB+ 5.3.4 and SBClient 5.3.4

We are running many interfaces using callHTTP from Windows and Linux servers
at our customer sites and they have been working fine.  We now have a
customer who needs to run some of these interface through an ISA Proxy
server.  Their UniVerse box is Windows 2000 sp4.  They have set the ISA
server to allow all communication to go through without authentication and
they have other vendors using .NET applications that are working fine, yet
no matter what we have tried we cannot get the request through.  The
protocol logging shows the following:

 

proxy response: HTTP/1.1 407 Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied.  )Via:1.1

 

Does anyone have any experience, ideas, suggestions that they can offer on
this problem?

Any help is greatly appreciated.

Thank you,

Mike

 

Mike Dallaire

Programmer

IBM Certified Solutions Expert - U2 UniVerse V9.6 Administrator for Unix and
Windows

Mortgage Builder Software Inc.

(248) 304-0600 x 103

[EMAIL PROTECTED]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] callHTTP using a Proxy Server

2007-01-25 Thread Scott Richardson
Microsoft ISA Server. What a PITA.
Configure it exactly correctly - or better yet - Remove it.
Error barks pretty clearly on permission  authorization to access to the
service, so clearly something isn't right in ISA.
Typically it denies any processes running as user local System access to
anything outside the box.

- Original Message - 
From: Mike Dallaire [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Thursday, January 25, 2007 9:09 AM
Subject: [U2] callHTTP using a Proxy Server


 UniVerse 10.1

 SB+ 5.3.4 and SBClient 5.3.4

 We are running many interfaces using callHTTP from Windows and Linux
servers
 at our customer sites and they have been working fine.  We now have a
 customer who needs to run some of these interface through an ISA Proxy
 server.  Their UniVerse box is Windows 2000 sp4.  They have set the ISA
 server to allow all communication to go through without authentication and
 they have other vendors using .NET applications that are working fine, yet
 no matter what we have tried we cannot get the request through.  The
 protocol logging shows the following:



 proxy response: HTTP/1.1 407 Proxy Authentication Required ( The ISA
Server
 requires authorization to fulfill the request. Access to the Web Proxy
 service is denied.  )Via:1.1



 Does anyone have any experience, ideas, suggestions that they can offer on
 this problem?

 Any help is greatly appreciated.

 Thank you,

 Mike



 Mike Dallaire

 Programmer

 IBM Certified Solutions Expert - U2 UniVerse V9.6 Administrator for Unix
and
 Windows

 Mortgage Builder Software Inc.

 (248) 304-0600 x 103

 [EMAIL PROTECTED]
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] callHTTP using a Proxy Server

2007-01-25 Thread Scott Richardson
 Original Message - 
From: Mike Dallaire [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Thursday, January 25, 2007 9:09 AM
Subject: [U2] callHTTP using a Proxy Serve
 UniVerse 10.1
 SB+ 5.3.4 and SBClient 5.3.4
 We are running many interfaces using callHTTP from Windows and Linux
servers
 at our customer sites and they have been working fine.  We now have a
 customer who needs to run some of these interface through an ISA Proxy
 server.  Their UniVerse box is Windows 2000 sp4.  They have set the ISA
 server to allow all communication to go through without authentication and
 they have other vendors using .NET applications that are working fine, yet
 no matter what we have tried we cannot get the request through.  The
 protocol logging shows the following:

 proxy response: HTTP/1.1 407 Proxy Authentication Required ( The ISA
Server
 requires authorization to fulfill the request. Access to the Web Proxy
 service is denied.  )Via:1.1

 Does anyone have any experience, ideas, suggestions that they can offer on
 this problem?  Any help is greatly appreciated   Thank you,
 Mike Dallaire, Programmer

Remember, Google is your friend, and the next best thing to having no
documentation.

iexplore google.com on the following:
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied.  )

Also,  check browser  Internet Options  Security settings for particular
settings to ensure they're configured properly on Client systems
accessing/calling the Server, (or whatever process is being used to
access/call), and also on the Server providing the service, or the
Web-Server, for that particular port, as compared to standard usage ports..
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] callHTTP using a Proxy Server

2007-01-25 Thread Anthony Caufield
I used ISA and have had very little issue. I am not sure based on this
email what OS level or version of ISA is running. There is also no
indication of how this server is published. Is the client in the network
that has ISA and trying to hit a server exposed to the web or the other
way around. What are the details of the ISA rule. I am also not that
familiar with SB+ I am unclear on its authentication methods but if it
requires network access then you may need to have the request come from
the ISA server as opposed to from the original client.

Tony

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Richardson
Sent: Thursday, January 25, 2007 6:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] callHTTP using a Proxy Server

Microsoft ISA Server. What a PITA.
Configure it exactly correctly - or better yet - Remove it.
Error barks pretty clearly on permission  authorization to access to
the
service, so clearly something isn't right in ISA.
Typically it denies any processes running as user local System access
to
anything outside the box.

- Original Message - 
From: Mike Dallaire [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Thursday, January 25, 2007 9:09 AM
Subject: [U2] callHTTP using a Proxy Server


 UniVerse 10.1

 SB+ 5.3.4 and SBClient 5.3.4

 We are running many interfaces using callHTTP from Windows and Linux
servers
 at our customer sites and they have been working fine.  We now have a
 customer who needs to run some of these interface through an ISA Proxy
 server.  Their UniVerse box is Windows 2000 sp4.  They have set the
ISA
 server to allow all communication to go through without authentication
and
 they have other vendors using .NET applications that are working fine,
yet
 no matter what we have tried we cannot get the request through.  The
 protocol logging shows the following:



 proxy response: HTTP/1.1 407 Proxy Authentication Required ( The ISA
Server
 requires authorization to fulfill the request. Access to the Web Proxy
 service is denied.  )Via:1.1



 Does anyone have any experience, ideas, suggestions that they can
offer on
 this problem?

 Any help is greatly appreciated.

 Thank you,

 Mike



 Mike Dallaire

 Programmer

 IBM Certified Solutions Expert - U2 UniVerse V9.6 Administrator for
Unix
and
 Windows

 Mortgage Builder Software Inc.

 (248) 304-0600 x 103

 [EMAIL PROTECTED]
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] callHTTP

2006-11-21 Thread Stuart . Boydell
Stu,
I forgot to mention what you might expect back in the response and headers 
fields. The response will
contain whatever the web service you are posting to/requesting from is 
programmed to respond with.
In the case of a web service, for example, it will probably return an XML 
document. In the case of a
web site it may return whatever exists at that URL eg html or possibly a zip or 
doc file for
example. If you get something like this in your response, the http Headers 
should contain the mime
type and other info about the document.
Generally, it will then be up to you to handle and process the file with 
whichever tools you
determine are appropriate. Generally I think most web protocols will do some 
form of ascii encoding
(b64/uucp/etc) to ensure that the file is web safe. If you receive the file in 
this way then you
have to uncompress/uuucp/b64 it. Otherwise, if the file is potentially binary 
then you need to
handle it more delicately with UV as writes, for example, can munge the file. 
Also, the potential
size of a file could be an issue.
HTH
Stuart Boydell



From: Stuart.Boydell
This shows how to post a simple (xml) purchase order to a web service -
response contained in 'response'.

program TEST.POST
equ E.THIS.PROG to 'TEST.POST'
equ E.URL to 'http://10.1.1.123/eprocurement.aspx'
equ E.POST to 'POST:text/xml' ;*// note mime type is possibly optional
sessionHandle = ''
httpHeaders = ''
httpStatus = ''
postData = ' ns0:PO xmlns:ns0=http://HTTPRequestResponse.POSchema; 
ItemItem01 /Item
Price500 /Price /ns0:PO'
if not(createRequest(E.URL,E.POST,sessionHandle)) then
crt 'return
status=':submitRequest(sessionHandle,6,postData,httpHeaders,response 
,httpStatus)
end
crt 'httpStatus=':httpStatus
crt 'httpHeaders=':httpHeaders
crt 'response=':response
the:end

Stuart Boydell
___
From: Stu Glancy
Does anyone have any examples of using callHTTP to GET and/or POST.
I'm in the early stages of figuring out how to use callHTTP and have had
some success in being able to GET but it's only html that comes back. I
need examples of GETting a file or POSTing a file. Any help would be
appreciated.


 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CALLHTTP....UV 10

2006-07-07 Thread George Gallen
thanks. I'll look through them.
Although it appears it's easier to use wget to read the https:// page than
  to set it up in UV, but I'll play with the codes just to get it to work :)

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Wendy Smoak
 Sent: Wednesday, July 05, 2006 2:19 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] CALLHTTPUV 10
 
 
 On 7/5/06, George Gallen [EMAIL PROTECTED] wrote:
 
  OK. Adding in the setHTTPDefault and the setRequestHeader 
 got it working.
 
  Now...I need to read an https:// URL
 
 Not reading for content, but see if anything here helps:
 
http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTPWithSSL
 
 also:http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTP
 
 -- 
 Wendy
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CALLHTTP....UV 10

2006-07-05 Thread George Gallen
OK. Adding in the setHTTPDefault and the setRequestHeader got it working.

Now...I need to read an https:// URL

I changed my createrequest to createsecurerequest, and now I have my security 
handle.

The data isn't being read, I have getting a 400 page error instead.

I didn't see a submitsecurerequest() command..

George

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Peter Veenhof
 Sent: Tuesday, July 04, 2006 8:48 AM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] CALLHTTPUV 10
 
 
 Hi,
 
 I think I had similar problems, but eventually got it working 
 with this
 code:
 
 HTTP.METHOD = 'GET'
 REQ.HANDLE = '' ; POST.DATA = '' ; TIME.OUT = '' ; RESP.HEADERS = '' ;
 RESP.DATA = '' ; HTTP.STATUS = ''
 Ret = setHTTPDefault('VERSION','1.1')
 Ret = createRequest(URL,HTTP.METHOD,REQ.HANDLE)
 Ret = setRequestHeader(REQ.HANDLE,'Connection','Keep-Alive')
 RET.STATUS =
 SubmitRequest(REQ.HANDLE,TIME.OUT,POST.DATA,RESP.HEADERS,RESP.
 DATA,HTTP.
 STATUS)
 
 
 Where RESP.DATA will contain the downloaded data
 
 Setting the HTTP Version to 1.1 is what fixed mine to get the data to
 come down, I do recall only getting headers previous to that.
 
 Hope that helps
 
 Peter
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of George Gallen
 Sent: Monday, July 03, 2006 4:15 PM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] CALLHTTPUV 10
 
 I'm trying to setup a very simple web call.
 
 STATUS1=CREATEREQUEST(URL,GET,SHANDLE)
 STATUS2=SUBMITREQUEST(SHANDLE,1000,,HEADERS,RDAT,HSTATUS)
 
 OK. From what I gather, the above two lines, should download the
 webpage
 specified in URL.
 
 I'm getting strange information in HEADERS and RDAT but the 
 HSTATUS says
 200
 (ok)
 
 What I want to do is access a URL and get the resulting information.
 
 I was using wget, but it keeps hanging. I just want to use something
 else, and
 thought I'd
 try to go UV native.
 
 In actuality, I will really need to use 
 CREATESECUREREQUEST(), But I'll
 tackle
 that one
 when I get the non-secure working first...:)
 
 Any examples would be very helpful
 
 Thanks
 George
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CALLHTTP....UV 10

2006-07-05 Thread Wendy Smoak

On 7/5/06, George Gallen [EMAIL PROTECTED] wrote:


OK. Adding in the setHTTPDefault and the setRequestHeader got it working.

Now...I need to read an https:// URL


Not reading for content, but see if anything here helps:

  http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTPWithSSL

also:http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTP

--
Wendy
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CALLHTTP....UV 10

2006-07-04 Thread Peter Veenhof
Hi,

I think I had similar problems, but eventually got it working with this
code:

HTTP.METHOD = 'GET'
REQ.HANDLE = '' ; POST.DATA = '' ; TIME.OUT = '' ; RESP.HEADERS = '' ;
RESP.DATA = '' ; HTTP.STATUS = ''
Ret = setHTTPDefault('VERSION','1.1')
Ret = createRequest(URL,HTTP.METHOD,REQ.HANDLE)
Ret = setRequestHeader(REQ.HANDLE,'Connection','Keep-Alive')
RET.STATUS =
SubmitRequest(REQ.HANDLE,TIME.OUT,POST.DATA,RESP.HEADERS,RESP.DATA,HTTP.
STATUS)


Where RESP.DATA will contain the downloaded data

Setting the HTTP Version to 1.1 is what fixed mine to get the data to
come down, I do recall only getting headers previous to that.

Hope that helps

Peter



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George Gallen
Sent: Monday, July 03, 2006 4:15 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] CALLHTTPUV 10

I'm trying to setup a very simple web call.

STATUS1=CREATEREQUEST(URL,GET,SHANDLE)
STATUS2=SUBMITREQUEST(SHANDLE,1000,,HEADERS,RDAT,HSTATUS)

OK. From what I gather, the above two lines, should download the
webpage
specified in URL.

I'm getting strange information in HEADERS and RDAT but the HSTATUS says
200
(ok)

What I want to do is access a URL and get the resulting information.

I was using wget, but it keeps hanging. I just want to use something
else, and
thought I'd
try to go UV native.

In actuality, I will really need to use CREATESECUREREQUEST(), But I'll
tackle
that one
when I get the non-secure working first...:)

Any examples would be very helpful

Thanks
George

George Gallen
Senior Programmer/Analyst
Accounting/Data Division
[EMAIL PROTECTED]
ph:856.848.1000 Ext 220

SLACK Incorporated - Delivering the best in health care information and
education worldwide.
http://www.slackinc.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] CALLHTTP....UV 10

2006-07-03 Thread George Gallen
I'm trying to setup a very simple web call.

STATUS1=CREATEREQUEST(URL,GET,SHANDLE)
STATUS2=SUBMITREQUEST(SHANDLE,1000,,HEADERS,RDAT,HSTATUS)

OK. From what I gather, the above two lines, should download the webpage
specified in URL.

I'm getting strange information in HEADERS and RDAT but the HSTATUS says 200
(ok)

What I want to do is access a URL and get the resulting information.

I was using wget, but it keeps hanging. I just want to use something else, and
thought I'd
try to go UV native.

In actuality, I will really need to use CREATESECUREREQUEST(), But I'll tackle
that one
when I get the non-secure working first...:)

Any examples would be very helpful

Thanks
George

George Gallen
Senior Programmer/Analyst
Accounting/Data Division
[EMAIL PROTECTED]
ph:856.848.1000 Ext 220

SLACK Incorporated - Delivering the best in health care information and
education worldwide.
http://www.slackinc.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] CallHTTP

2006-01-09 Thread Peter Veenhof
Hi all,

Does anyone have a simple example of doing a HTTP POST from within
Universe Basic? The documentation doesn't have any example code and I've
failed to get it to work.

Thanks
Peter
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP

2006-01-09 Thread Wendy Smoak
On 1/9/06, Peter Veenhof [EMAIL PROTECTED] wrote:

 Does anyone have a simple example of doing a HTTP POST from within
 Universe Basic? The documentation doesn't have any example code and I've
 failed to get it to work.

The Pick Wiki has:
   http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTP
and
   http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTPWithSSL

There might be something here as well:  http://www.picksource.com/

HTH,
--
Wendy
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [Potentially SPAM Header Checking] - [U2] CallHTTP - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-01-09 Thread Barry Rogen
val=
reoptVar=
wreoptVar=
reoptVar1=PROXY_NAME
reoptVar2=PROXY_PORT
reoptVar3=VERSION
reoptVar4=BUFSIZE
reoptVar5=AUTHENTICATE
reoptVar6=HEADERS
val1=
val2=
val3=1.1
val4=
val5 = 
val6=
wreoptVar1=PROXY_NAME
wreoptVar2=PROXY_PORT
wreoptVar3=VERSION
wreoptVar4=BUFSIZE
wreoptVar5=AUTHENTICATE
wreoptVar6=HEADERS
FOR I = 1 TO 6
   RESULT=setHTTPDefault(wreoptVarI,valI)
NEXT I
LIMIT = DCOUNT(reoptVar,@FM)
FOR I = 1 TO LIMIT
   RESULT=getHTTPDefault(reoptVarI,val)
NEXT I
RESULT=getHTTPDefault(reoptVarI,val)
RHANDLE=
RESULT=createRequest(http://blabla.yada.com/boolaboola.asp,RHANDLE)

RESULT=addRequestParameter(RHANDLE, ccnum,
CC.NO,multipart/form-data)
RESULT=addRequestParameter(RHANDLE, cvv,
CODE.NO,multipart/form-data)

RESULT=submitRequest(RHANDLE,45000,,RHEAD,RDATA,RSTAT)

 CAPTURE.STATUS = CHANGE(CHANGE(RDATA,CHAR(013):CHAR(010),@VM),@FM,@V

Barry  Rogen
PNY Technologies, Inc.
Senior  Programmer/Analyst
(973)  515 - 9700  ext 5327
[EMAIL PROTECTED]

-
Far better it is to dare mighty things, to win 
glorious triumphs even though checkered by
failure, than to rank with those poor spirits who
neither enjoy nor suffer much because they live
in the gray twilight that knows neither victory
nor defeat




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Veenhof
Sent: Monday, January 09, 2006 9:38 AM
To: u2-users@listserver.u2ug.org
Subject: [Potentially SPAM Header Checking] - [U2] CallHTTP - Email has
different SMTP TO: and MIME TO: fields in the email addresses

Hi all,

Does anyone have a simple example of doing a HTTP POST from within
Universe Basic? The documentation doesn't have any example code and I've
failed to get it to work.

Thanks
Peter
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

NOT INTENDED AS A SUBSTITUTE FOR A WRITING 

NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN 
ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY 
CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING 
OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC 
TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF 
SIMILAR SUBSTANCE OR EFFECT.  THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS 
ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO 
A CONTRACT.  NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A 
PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.  

This e-mail message from PNY Technologies, Inc. is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2006-01-09 Thread Perry Taylor
Peter,

Here are a couple of local subroutines I use for synchronizing records
to other servers using a CGI post.  The corresponding CGI program on the
hosts generates a return value structured like...

SG: NUMBER.OF.ERRORS: SG: ERROR.MESSAGES

Where SG is EQUATEd to CHAR(255), ERROR.MESSAGES is an
attribute-delimited array of error messages and NUMBER.OF.ERRORS =
DCOUNT(ERROR.MESSAGES, @AM).  It makes it simple to make sure we got
something legitimate back from the POST without having to interpret all
the various http status codes.

Hope this helps.

Perry Taylor
Zirmed, Inc.


!
POST:
  
  POST.ERRMSG = NUL
 
  URL = 'http://': HOSTNAME:
'/~http/cgi-bin/chglog.mirror.update.cgi'
 
  RV = createRequest(URL, 'POST', HDL)
 
  IF RV THEN

 POST.ERRMSG-1 = 'creeateRequest() failure, retval=': RV: '.'
 POST.ERRMSG-1 = 'URL=': URL

 RETURN

  END
 
  PARAM.NAME  = 'ACTION'
  PARAM.VALUE = ACTION

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  PARAM.NAME  = 'CHGLOGID'
  PARAM.VALUE = CHGLOG.ID

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  PARAM.NAME  = 'CHGLOGREC'
  PARAM.VALUE = CHGLOG.REC

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  RESP.HDRS   = NUL
  RESP.DATA   = NUL
  HTTP.STATUS = NUL

  RV = submitRequest(HDL, NUL, NUL, RESP.HDRS, RESP.DATA,
HTTP.STATUS)
 
  IF RV THEN

 POST.ERRMSG-1 = 'submitRequest() failure, retval=': RV: '.'

 RETURN

  END
 
  IF RESP.DATA MATCHES '': SG: '1N0N': SG: '0X' THEN

 IF FIELD(RESP.DATA, SG, 2) THEN

POST.ERRMSG-1 = FIELD(RESP.DATA, SG, 3)
   
 END

  END ELSE

 POST.ERRMSG-1 = 'Unexpected response from HTTP post.'
 POST.ERRMSG-1 = STR('-', 79)
 POST.ERRMSG-1 = RESP.DATA
 POST.ERRMSG-1 = STR('-', 79)
 POST.ERRMSG-1 = 'http status=': HTTP.STATUS

  END
  
  RETURN
!
POST.ADD.PARAM:

  
  IF LEN(PARAM.NAME) ELSE

 POST.ERRMSG-1 = 'No parameter name specified.'

 RETURN

  END

  RV = addRequestParameter(HDL, PARAM.NAME, PARAM.VALUE, NUL)
 
  IF RV THEN

 POST.ERRMSG-1 = 'addRequestParameter() failure to added '
 POST.ERRMSG:= PARAM.NAME: ', retval=': RV: '.'

  END

  RETURN

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Veenhof
Sent: Monday, January 09, 2006 7:38 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] CallHTTP

Hi all,

Does anyone have a simple example of doing a HTTP POST from within
Universe Basic? The documentation doesn't have any example code and I've
failed to get it to work.

Thanks
Peter
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health Information, 
any communications containing such material will be returned to the originating 
party with such advisement noted. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2006-01-09 Thread Peter Veenhof
Thanks to all who gave me tips, I got it working! I had problems with
AM's being inside my posted data as well is a wrong encoding type, once
I solved those issues it works perfect.

Thanks again
Peter


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor
Sent: Monday, January 09, 2006 11:40 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] CallHTTP

Peter,

Here are a couple of local subroutines I use for synchronizing records
to other servers using a CGI post.  The corresponding CGI program on the
hosts generates a return value structured like...

SG: NUMBER.OF.ERRORS: SG: ERROR.MESSAGES

Where SG is EQUATEd to CHAR(255), ERROR.MESSAGES is an
attribute-delimited array of error messages and NUMBER.OF.ERRORS =
DCOUNT(ERROR.MESSAGES, @AM).  It makes it simple to make sure we got
something legitimate back from the POST without having to interpret all
the various http status codes.

Hope this helps.

Perry Taylor
Zirmed, Inc.


!
POST:
  
  POST.ERRMSG = NUL
 
  URL = 'http://': HOSTNAME:
'/~http/cgi-bin/chglog.mirror.update.cgi'
 
  RV = createRequest(URL, 'POST', HDL)
 
  IF RV THEN

 POST.ERRMSG-1 = 'creeateRequest() failure, retval=': RV: '.'
 POST.ERRMSG-1 = 'URL=': URL

 RETURN

  END
 
  PARAM.NAME  = 'ACTION'
  PARAM.VALUE = ACTION

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  PARAM.NAME  = 'CHGLOGID'
  PARAM.VALUE = CHGLOG.ID

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  PARAM.NAME  = 'CHGLOGREC'
  PARAM.VALUE = CHGLOG.REC

  GOSUB POST.ADD.PARAM
  IF LEN(POST.ERRMSG) THEN RETURN

  RESP.HDRS   = NUL
  RESP.DATA   = NUL
  HTTP.STATUS = NUL

  RV = submitRequest(HDL, NUL, NUL, RESP.HDRS, RESP.DATA,
HTTP.STATUS)
 
  IF RV THEN

 POST.ERRMSG-1 = 'submitRequest() failure, retval=': RV: '.'

 RETURN

  END
 
  IF RESP.DATA MATCHES '': SG: '1N0N': SG: '0X' THEN

 IF FIELD(RESP.DATA, SG, 2) THEN

POST.ERRMSG-1 = FIELD(RESP.DATA, SG, 3)
   
 END

  END ELSE

 POST.ERRMSG-1 = 'Unexpected response from HTTP post.'
 POST.ERRMSG-1 = STR('-', 79)
 POST.ERRMSG-1 = RESP.DATA
 POST.ERRMSG-1 = STR('-', 79)
 POST.ERRMSG-1 = 'http status=': HTTP.STATUS

  END
  
  RETURN
!
POST.ADD.PARAM:

  
  IF LEN(PARAM.NAME) ELSE

 POST.ERRMSG-1 = 'No parameter name specified.'

 RETURN

  END

  RV = addRequestParameter(HDL, PARAM.NAME, PARAM.VALUE, NUL)
 
  IF RV THEN

 POST.ERRMSG-1 = 'addRequestParameter() failure to added '
 POST.ERRMSG:= PARAM.NAME: ', retval=': RV: '.'

  END

  RETURN

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Veenhof
Sent: Monday, January 09, 2006 7:38 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] CallHTTP

Hi all,

Does anyone have a simple example of doing a HTTP POST from within
Universe Basic? The documentation doesn't have any example code and I've
failed to get it to work.

Thanks
Peter
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review, use,
disclosure or distribution is prohibited. ZirMed, Inc. has strict
policies regarding the content of e-mail communications, specifically
Protected Health Information, any communications containing such
material will be returned to the originating party with such advisement
noted. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2006-01-09 Thread Tony Gravagno
If CallHTTP doesn't do what you need, look into cURL.  It's open source and
free, well supported, very stable, very popular, and it's quite capable of
doing HTTP post w/wo SSL as well as many other tricks.

HTH
T

Wendy Smoak wsmoak-at-gmail.com |U2UG| wrote:
 On 1/9/06, Peter Veenhof [EMAIL PROTECTED] wrote:
 
 Does anyone have a simple example of doing a HTTP POST
 from within Universe Basic? The documentation doesn't
 have any example code and I've failed to get it to work.
 
 The Pick Wiki has:
http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTP
 and
http://www.pickwiki.com/cgi-bin/wiki.pl?CallHTTPWithSSL
 
 There might be something here as well: 
 http://www.picksource.com/ 
 
 HTH,
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP

2004-07-22 Thread Lee Bacall
Anyone know offhand what the limit may be on a GET?

Thanks
Lee Bacall
http://www.binarystar.com
Phone: +1 (954) 791-8575
Cell:  +1 (954) 655-6581

- Original Message - 
From: Wendy Smoak [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Nick Cipollina
[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 6:24 PM
Subject: RE: [U2] CallHTTP


snip

 Are you doing a GET or a POST?  There is a limit on GET, but it comes
 from the HTTP specification, not UniVerse.  (And exceeding it is no
 excuse for it dying like that!)

 -- 
 Wendy Smoak
 (Sent at 3:25 PM)
 ---
 u2-users mailing list
 [EMAIL PROTECTED]
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2004-07-22 Thread Michael Spencer
It is the same limit as the length of a url which I think is 2083. 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lee Bacall
Sent: July 22, 2004 11:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] CallHTTP

Anyone know offhand what the limit may be on a GET?

Thanks
Lee Bacall
http://www.binarystar.com
Phone: +1 (954) 791-8575
Cell:  +1 (954) 655-6581

- Original Message -
From: Wendy Smoak [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Nick Cipollina
[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 6:24 PM
Subject: RE: [U2] CallHTTP


snip

 Are you doing a GET or a POST?  There is a limit on GET, but it comes
 from the HTTP specification, not UniVerse.  (And exceeding it is no
 excuse for it dying like that!)

 -- 
 Wendy Smoak
 (Sent at 3:25 PM)
 ---
 u2-users mailing list
 [EMAIL PROTECTED]
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] CallHTTP

2004-07-21 Thread Nick Cipollina
Is anyone aware of any limitations to the length of parameter_value in
the
addRequestParameter(request_handle,parameter_name,parameter_value,conten
t_handling) function.  We are trying to sent XML data to a web service,
and the longer parameter_value gets I get the following error message:



CRITICAL ERROR! Notify the system administrator.


Abnormal termination of UniVerse.


Fault type is 11.  Layer type is BASIC run machine.


Fault occurred in BASIC program WS.TESTER at address 3ba.


Segmentation Fault(coredump)



I tried increasing BUFSIZE to no avail.  Has anyone else run into this
problem as well?  Thanks in advance.



Nick Cipollina



Pick Programmer

ACS - Heritage Information Systems, Inc.

2810 North Parham Road, Suite 210

Richmond, VA 23294

(804)644-8707 x 314

[demime 1.01d removed an attachment of type text/x-vcard which had a name of Nick 
Cipollina.vcf]
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2004-07-21 Thread David Jordan
That may not be related to CallHTTP, that may be a variable in your program
that has not been cleared and is continually being appended to till it
overflows memory. Check the program for that typeof bug.

Regards

David Jordan
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2004-07-21 Thread Tony Gravagno
Wendy Smoak wrote:

 Nick Cipollina wrote:
 Is anyone aware of any limitations to the length of parameter_value
 in the addRequestParameter(request_handle,parameter_name,parameter_va
 lue,conten t_handling) function.
 
 CRITICAL ERROR! Notify the system administrator.
 Abnormal termination of UniVerse.
 Fault type is 11.  Layer type is BASIC run machine.
 Fault occurred in BASIC program WS.TESTER at address 3ba.
 Segmentation Fault(coredump)
 
 Are you doing a GET or a POST?  There is a limit on GET, but it comes
 from the HTTP specification, not UniVerse.  (And exceeding it is no
 excuse for it dying like that!)

I was waiting to see a post along these lines.  You're right that there's no
excuse for it dying like that, but I actually don't think there is a defined
limit for a GET or query string.  Here are some related factors.  Some or
none may be relevant here, but it's good to consider these things:

- The length of the query string in total is generally agreed to limit at
1024 bytes, but I don't think that's a part of the spec.
- There are occasionally limits on the size of the domain name, which is
included in the total for the query string.
- There may be no defined client side limit, but some browsers do limit
their upload byte count, and that changes with releases.
- Some web servers and browsers have a specific limit on the total amount of
data submitted in the header parameters for any given form, whether GET or
POST.  This may be release-dependent.  For example, (from (bad) memory) IIS4
allowed up to 2MB for headers, IIS5 brought that down to a default of 1MB
(?), IIS6 even further down to 2K (?).  I've seen individual utilities limit
this after data comes into a web server so that the application doesn't get
crashed by too much data.
- Some browsers have yet another limit on the size of the FORM ACTION
parameter.

Since the original inquiry is dealing with CallHTTP, this isn't a browser,
and since the error is coming from Universe the issue is not with the
server.  In this case it seems addRequestParameter has yet another limit
which the authors felt reasonable, but they didn't code a nice error for
anyone who tries to exceed that value.

One way around this sort of thing relies on you having access to the server
side of the Web Service: Code it so that data can be posted in pieces rather
than megabytes at a time.  One of the parameters passed to the input can be
block X of Y and the last block sent to the Web Service should get a
confirmation for all blocks in the return values.

HTH,
Tony
Nebula RD
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP

2004-07-21 Thread Craig Bennett
Tony,
- There are occasionally limits on the size of the domain name, which is
included in the total for the query string.
RFC3696 (which collates information from other RFCs) places the 
following limitations on a hostname from DNS:

A DNS label (the parts of a domain name delimited by '.') may not be 
longer than 63 octets.

A complete fully qualified domain name cannot be longer than 255 octets.
Probably nothing to do with the CallHTTP  problem, but useful to know.

Craig
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] CallHTTP

2004-07-21 Thread Craig Bennett
Nick,
I have previously posted UV code which uses sockets to do HTTP rather 
than CallHTTP -- this might solve your problem in the short term.

Craig
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] CallHTTP

2004-07-21 Thread djordan
The type of error message is typical from a variable growing beyond the
memory size.  If it is not the program, is their a log file or como file or
something in the backgroud that could be getting large.  Otherwise it might
be a limitation in the C routine that is parsing the HTTP.  I would get on
to IBM support.

Regards

David Jordan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Cipollina
Sent: Thursday, 22 July 2004 11:38 AM
To: [EMAIL PROTECTED]
Subject: RE: [U2] CallHTTP


It's not.  The error doesn't occur until I try to submit my http request.
And it happens the first time through.  I am sending multiple transactions
as an XML string.  I can send 3 in a single string, but when I get to 4 it
causes this to happen.

Nick
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] CallHttp and SSL

2004-05-19 Thread Stephen Krauklis
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users