Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Diff between Coldfusion web service and a regular page

Posted on 2012-03-23
4
Medium Priority
?
329 Views
Last Modified: 2012-03-26
Hello,

I am creating an small app to accept an http request (non SOAP) from another company. This request will be a form post, the form fields will be processed and either a 1 or 0 should be returned. I was thinking about doing this as w web service but I have some basic questions.

Is there an advantage of using a web service vs. a regular .cfm page to process the request?

When you create the WS in CF8 is there a way to tell it that a username and passwd is required to access the web service? The username/pwd in the CF admin page does not do this, actually, I am not sure what that unm/pwd are for because it does not seem to effect consuming the web service or accessing the WS in the cfasmin. I can require that username/pw fields be passed in the form and check that but how would that be different from a regular web page?

Thanks.

Joe
0
Comment
Question by:ckercher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:ckercher
ID: 37759239
Actually, you don't even need to create the web service in CF admin. Just create the CFC and access it.
0
 
LVL 7

Expert Comment

by:micropc1
ID: 37759322
Right - its just a normal CFC - you just interact with it differently. This might be useful...
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78a6.html
0
 
LVL 9

Accepted Solution

by:
digicidal earned 1600 total points
ID: 37760085
In the case of a non-SOAP request you would want to simply use a normal page (although you could certainly design a CFC to handle the request as well).  Since you are receiving a plain HTML form post with limited 'call-response' behavior - I would simply make a page to handle that request.  It seems that you are simply taking input and storing that information for retrieval by another application/system/db etc..  It's certainly up to you, but I would just keep it simple.  You can always wrap the process up into a WS later on if you need to have more bi-directional communication with the intended data originator (the one sending the post).

For the most part, a WS is like a miniature application in itself.  They're great for allowing remote applications to query a database on your server, or provide status updates and move more complex information back and forth.  For example, if you wanted your application to return an array of all the submitted data and a status message related to each field on the form individually... you would want a WS.  If you simply want to allow an HTML form to be posted to a page which then either says "YAY" or "BOO" in response... just use a page for that.
0
 

Author Comment

by:ckercher
ID: 37768283
Thanks for your inputs. I do not really see an advantage to using a WS so I am just creating a regular page to process these requests.
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question