Solved

Diff between Coldfusion web service and a regular page

Posted on 2012-03-23
4
323 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 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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 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