Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Mike Paim #1
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
-
Help! - Passing form data between multiple pages
Hi, I am working on a multiple pages survey, right now if my user fill out page 1, click next, then fill out page2, page3, his answer will be... -
passing data between pages... one has a drop down form
I need to pass a zip code from a drop down form on one .cfm (passing.cfm) to another. How does the receiving page (receiving.cfm) understand which... -
Passing parameters from t Java application to Flash
Hi all, Does anybody know if it's possible to pass data from a Java application (JSP pages / Servlets) to a Flash application ? Thanks a lot... -
Passing information between pages
I am currently building a site, and we have a number of users that can have a particular priveledge, but each user has their own set of cases that... -
[PHP] Passing $Vars between 2 php pages
Thank you Robert! But, I forgot to mention... "and without URI" -
mpwoodward *TMM* #2
Re: Passing Data between CF and Java pages
On 2005-05-03 07:28:58 -0500, "Mike Paim" <webforumsuser@macromedia.com> said:
If I understand what you're getting at, the simplest way to do this> 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.
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@gmail.com[/email]
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
Mike Paim #3
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
-
Kronin555 #4
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
-
James168 #5
Re: Passing Data between CF and Java pages
Hi,
I have problems that passing a JavaScript variable back to CF in a JavaScript
item change event. For example, a user selects a state in one dropdown list,
all the cities in the state should appear in another dropdown list.
Try One method:
<cfset STvar = ''CA'> -- Works if is set to constant value
<cfset STvar = ''{stselect.text}'> -- Not Work if try to read a field
<cfquery name="city" datasource="xxx".
SELECT REGION FROM WEB."CITY" WHERE (STCODE = '#STvar#' )
</cfquery>
Try method 2:
<cfset STsel = 'AL' > Works if is set to constant
<cfset STsel = "{stselect.selectedItem.data}" > No Work - - after the
<cfquery>, it returns me the correct SQL syntax, but not the result of the
query.
<cfset strSQL= "SELECT City FROM WEB.""STATE"" WHERE (STCODE = '" &
variables.STsel & "' )">
<cfquery name="city" datasource="xxx">
#Evaluate('strSQL')#
</cfquery>
In the last method, how can I get the query result of the #Evaluate('strSQL')#
if it returns the correct SQL statement. How can I read a selection text
field into a CfSet varialbe before I click the POST Submit button.
Thanks,
James
James168 Guest
-
Kronin555 #6
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



Reply With Quote

