Professional Web Applications Themes

Passing Data between CF and Java pages - Coldfusion - Advanced Techniques

I've got a ColdFusion page on one server and a Java page on another server. I need to make a request from the CF page for data such as "Company Name" or "Company Phone Number". The Java page (on a different server) will do some processing and return the data to the ColdFusion page... How does this communication take place on the CF side? I tried a ColdFusion Component but that method seems to be for processing internally. I need to pass the variables names of what I want and then receive back the variable name and the value. Any ...

  1. #1

    Default Passing Data between CF and Java pages

    I've got a ColdFusion page on one server and a Java page on another server. I
    need to make a request from the CF page for data such as "Company Name" or
    "Company Phone Number". The Java page (on a different server) will do some
    processing and return the data to the ColdFusion page...

    How does this communication take place on the CF side? I tried a ColdFusion
    Component but that method seems to be for processing internally. I need to pass
    the variables names of what I want and then receive back the variable name and
    the value.

    Any ideas or articles?

    Thanks.

    Mike Paim Guest

  2. #2

    Default Re: Passing Data between CF and Java pages

    On 2005-05-03 07:28:58 -0500, "Mike Paim" <webforumsusermacromedia.com> said:
    > I've got a ColdFusion page on one server and a Java page on another
    > server. I need to make a request from the CF page for data such as
    > "Company Name" or "Company Phone Number". The Java page (on a
    > different server) will do some processing and return the data to the
    > ColdFusion page...
    >
    > How does this communication take place on the CF side? I tried a
    > ColdFusion Component but that method seems to be for processing
    > internally. I need to pass the variables names of what I want and then
    > receive back the variable name and the value.
    >
    > Any ideas or articles?
    >
    > Thanks.
    If I understand what you're getting at, the simplest way to do this
    would probably be to use HTTP POST or GET. Just have the form (I'm
    assuming there's a form involved since you say "make a request for
    data") submit from the CF server to the Java server. The Java server
    won't care where the submission is coming from (dependent upon your
    security settings on the Java server of course). Then the Java server
    can do its thing and pass a response back to CF again via either POST
    or GET, with GET probably being the simpler means since you could just
    do a redirect on the Java server back to the CF server using a simple
    URL.

    You could also use web services of course, but based on what you're
    saying the web service would be on the Java server.

    Matt
    --
    Matt Woodward
    [email]mpwoodward[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  3. #3

    Default Re: Passing Data between CF and Java pages

    Matt,

    I guess I could make it into a form. However, I hadn't planned on it. There
    isn't neccessarily going to be someone one the page clicking submit, although
    it can autosubmit.

    The idea is that I've got a website that has basic customer and product
    information. However, to get detailed pricing information or detailed customer
    information, I need to make a request from the Java server, managed by another
    company. There would be sensitive information being passed back and forth.

    If I wanted to use a web service, I understand that the database hit would be
    on the Java server. However, what would I need to do on my side to send the
    variables to them?

    Example:
    Send to URL
    AcountNumber=8456123

    Receive to My Site:
    CompanyName="My Company"
    CompanyPhone="888-555-6263"

    ?
    Thanks,
    Michael

    Mike Paim Guest

  4. #4

    Default Re: Passing Data between CF and Java pages

    Mike,

    How to accomplish this all depends on how much control you have on the java
    side. You said it's controlled by another company. Is there already an
    interface? if so, what is it? is it form-based? is it a webservice? Do you have
    to authenticate with the other server first? how is that handled?

    If they already have a well-defined method for integration, then you just
    follow that. If they don't have a well-defined method and you have some leeway
    with how you take it, you need to take into account authentication if
    necessary, the complexity of the data being returned, etc. and that will point
    you to either using cfhttp calls to get the data, or trying to integrate with a
    webservice.

    Kronin555 Guest

  5. Moderated Post

    Default Re: Passing Data between CF and Java pages

    Removed by Administrator
    James168 Guest
    Moderated Post

  6. #6

    Default Re: Passing Data between CF and Java pages

    James, don't hijack this thread. Your question doesn't have anything to do with
    the original question. What you're looking for is dependent select boxes, and
    has been discussed at length before. There are CFX tags that already do exactly
    what you're looking for. Here's one example I pulled off of google. I know
    there's a much nicer one, but I can't find it right now:
    [url]http://www.cfdeveloper.co.uk/forum/forum_posts.asp?TID=129&PN=1&get=last[/url]

    Kronin555 Guest

Similar Threads

  1. Help! - Passing form data between multiple pages
    By xfl in forum Macromedia ColdFusion
    Replies: 2
    Last Post: May 13th, 06:19 PM
  2. passing data between pages... one has a drop down form
    By AWZ in forum Coldfusion - Getting Started
    Replies: 4
    Last Post: April 6th, 11:55 PM
  3. Passing parameters from t Java application to Flash
    By Francesco in forum Macromedia Flash
    Replies: 0
    Last Post: January 7th, 10:40 AM
  4. [PHP] Passing $Vars between 2 php pages
    By Valentin in forum PHP Development
    Replies: 3
    Last Post: July 17th, 03:34 AM
  5. Passing Details between pages
    By Aidan Gill in forum ASP.NET General
    Replies: 1
    Last Post: July 10th, 12:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139