Skip navigation

Passing CF variables in soap request

Jul 3, 2012 9:35 AM

  Latest reply: BKBK, Jul 17, 2012 11:14 PM
Replies 1 2 Previous Next
  • Currently Being Moderated
    Jul 14, 2012 3:43 AM   in reply to Emily LaMunyon

    Based on the information you've just provided, I will advise you to ignore my suggestion about the query. If, as you say, the file ID is coming in via the URL

     

    http://localhost/coldfusionpage.cfm?subdir=23&page_id=624010.pdf

     

    then simply replace

     

    <cfset fileID = "624010" />

     

    with

     

    <cfset fileID = listGetAt(URL.page_id, 1, ".") />

     

    That is dynamic enough. With no CPU-consuming query in sight!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 11:14 PM   in reply to Emily LaMunyon

    Emily LaMunyon wrote:

     

    So I tried your suggestion and the API seems to not like using this <cfset fileID = listGetAt(URL.page_id, 1, ".") />

    Pease expand on what you mean by "seems not to like". If the code

     

    <cfset fileID = "624010" />

     

    works, then I expect

     

    <cfset fileID = listGetAt(URL.page_id, 1, ".") />

     

    to work, too.

     

    I assume that you intend, in every case, to extract the fileID from the file-name of the PDF that comes in through the URL. In the URL you've given, that file-name is the variable URL.page_id. Its value is "624010.pdf".  You could treate this as a list with delimiter ".". In that case, "624010" will be the first list element. This is what the last line of code does.

     
    |
    Mark as:
1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points