Solved

Diff between Coldfusion web service and a regular page

Posted on 2012-03-23
4
309 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
  • 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 400 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
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…
This video discusses moving either the default database or any database to a new volume.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now