5 Replies Latest reply on Apr 10, 2007 4:41 PM by Dinghus

    CFHTTP versus CFINVOKE

    Dinghus Level 1
      Working on a site that is changing hosting companies and I found out that the new host doesn't allow CFINVOKE. So is it possible to change to CFHTTP using the same information such as URL for WSDL page?
        • 1. Re: CFHTTP versus CFINVOKE
          Level 7
          Dinghus wrote:
          > Working on a site that is changing hosting companies and I found out that the
          > new host doesn't allow CFINVOKE. So is it possible to change to CFHTTP using
          > the same information such as URL for WSDL page?
          >
          Potentially depending on the complexity of the web service. I'm not
          sure how complex a web service cfhttp can handle, but I've used it quite
          successfully for basic, well defined web services such as RSS feeds.
          • 2. Re: CFHTTP versus CFINVOKE
            Dinghus Level 1
            I guess the real problem is sending the request. Instead of CFINVOKE with the parameters looks like I have to change over to SOAP. Could be fun.
            • 3. CFHTTP versus CFINVOKE
              joeDangelo Level 1
              I've used CFHTTP to consume web services in older versions of CF... its pretty straightforward. Using the built-in SOAP functions in CF just reduces the complexity of it. Basically all you have to do is generate your request SOAP/XML document and save it into a CF variable using either the CFXML or CFSAVECONTENT tags and invoke the CFHTTP call with CFHTTPPARAM's to change the mime-type to text/xml and the message body as the saved SOAP/XML variable.
              • 4. Re: CFHTTP versus CFINVOKE
                Level 7
                joeDangelo wrote:
                > I've used CFHTTP to consume web services in older versions of CF... its pretty
                > straightforward. Using the built-in SOAP functions in CF just reduces the
                > complexity of it. Basically all you have to do is generate your request
                > SOAP/XML document and save it into a CF variable using either the CFXML or
                > CFSAVECONTENT tags and invoke the CFHTTP call with CFHTTPPARAM's to change the
                > mime-type to text/xml and the message body as the saved SOAP/XML tag.
                >

                That sounds like a very interesting technique. Could you provide a two
                bit example?
                • 5. Re: CFHTTP versus CFINVOKE
                  Dinghus Level 1
                  Well, that is what I'm trying to do. If there is an easier way, I'd love to hear it.