Solved

Diff between Coldfusion web service and a regular page

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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