That's correct Brian. We have talked about the symbolic link, but I
think we may still run into the length issue. Potentially the url could
have up to 10 more parameters.

I'm not totally comfortable using tinyURL but it was the quickest
easiest solution I could come up with.

We talked about(and I don't know if it is even a possibility) trying to
passing a URL to a JAVA program that could execute the URL.

I searched around for a little bit, but I didn't see anything that
looked like it might do that

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Brian May
Sent: Thursday, June 16, 2011 9:56 AM
To: Midrange Systems Technical Discussion
Subject: RE: Httpapi and tinyurl

I assume you need to shorten the URL so that you can use STRPCCMD. You
can most definitely get tinyURL to work, but maybe you don't have to.

Have you considered creating a symbolic link to shorten your url? If
you created a symbolic link in your htdocs folder called "d" and pointed
it to "FileNexus/BrowserClient/", you could shorten your url to
"http://rgc-filenexus/d/directlink.aspx?fid=58&cid=32&iid=23&iv=10037710
1' which would most likely be short enough for STRPCCMD.

Of course, I don't know all the specifics of your server setup and your
doc management software, but I think this could work for you.

HTH,

Brian May

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Smith, Mike
Sent: Wednesday, June 15, 2011 3:27 PM
To: Midrange Systems Technical Discussion
Subject: Httpapi and tinyurl

I have a project where I need to call a url(that accesses our document
management system) from within an RPG program.

I have experimented with building a .bat file before but I don't like
that solution, so I thought about using TINYURL to return a shorter link
that I can call.

So do to that I thought I would use Scotts HTTPAPI stuff.

I have this mostly working, but I'm not getting the correct link back
from tinyurl.

So I have this
'http://rgc-filenexus/FileNexus/BrowserClient/directlink.aspx?fid=58&cid
=32&iid=23&iv=100377101'

I expect to get back this from TinyUrl
http://tinyurl.com/3ohj5m4

Instead I'm getting
http://tinyurl.com/3o7lzto

Which translates to this

'http://rgc-filenexus/FileNexus/BrowserClient/directlink.aspx?fid=58'

I have been through the program and I don't see anywhere where I'm
truncating anything. Any idea why this is happening?


Basics of the code are below

C Eval URL = 'http://rgc-filenexus/FileNexus/+
C BrowserClient/directlink.aspx?+
C fid=58&cid=32&iid=23&iv=100377101'

C** The only diff between using HTTPwserClientg HTTP is
C** the URL that we pass. It starts with 'https://'
C Eval PostURL = 'http://tinyurl.com/api-+
C create.php?url='
C Eval PostData = URL
C
C callp HTTP_SetFileCCSID(819)
C Eval rc = http_url_post(%trim(PostURL) +
C %trim(postdata)
C : mypointer
C : %len(PostData)
C : logfile
C : HTTP_TIMEOUT
C : HTTP_USERAGENT)

Thanks

Mike



NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1382 / Virus Database: 1513/3705 - Release Date: 06/15/11

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].