Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting form data to a web service that saves it... possible?

Status
Not open for further replies.

mokaplanjr

Technical User
Dec 20, 2000
33
US
A client wants to add a form to their site that will post from the website (CF MX 6.1) to an asp.net web service that resides on their internal network and off the web. The network URL is something like " Why use a web service? I don't know; the site runs on a perfectly good MS SQL Server database and I had recommended saving form data to that, but he insists...

I have looked at examples of cfcomponent and associated tags to create a web service that creates an XML-based FEED for external consumption, but I cannot find a method that POSTS data to another web service. (The best examples are on user-based sites. The ones in the nice expensive books... not so much. They are pretty much a replay of Adobe's KB articles, which leave a lot to be desired.)

If it sounds like I am a bit bumfuzzled here, it's because I am. I haven't had the pleasure of creating a web service with Coldfusion yet, though it looks like a blast.

The way I think it might work is that the form on the website submits to a CF template that uses CFHTTP to forward, using the POST method, the form data to the internal network address (thus hiding the internal network address from the public). There would be no Coldfusion web service. His RECEIVING asp.net script would actually process the data. The worst thing is I don't have direct access (i.e. FTP) to the server (security reasons) and have to send files for them to install and test. So I can't just play around until I find the solution.

Bottom line... can a CF-based web service be made to POST DATA to another web service? If so, can you point me to an example?
 
I don't understand the need for the CF web service that you mentioned in the last line.

You have a form. The user enters data on the form and submits it. The form action page takes the submitted data, packages it in a HTTP request and sends it to the internal .NET Web service. The company has a firewall rule in place that accepts requests from the external Web server to the internal Web server. The Web service passes its reply to the form action page and you go from there.

Sorry about your environment. I wouldn't develop ANYTHING without access to a viable test environment.


Phil H.
Some Bank
-----------
Time's fun when you're having flies.
 
philhege:

Thanks, that is exactly what I was thinking and what I was getting at (perhaps not very well) in at the end of my post. I am going to send him some test files to install and try out based on this information.

Fingers crossed...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top