3 Replies Latest reply on Sep 11, 2006 7:22 AM by Newsgroup_User

    Receiving Sent XML in ColdFusion

    jimmy.hunt
      What is the best way to create a way for people to send you xml so that you can process it in CF?

      Currently, I'm reading the xml from a directory, but I would like to create a better way. Is there a easy way to accept sent xml via the web?

      Thanks
        • 1. Re: Receiving Sent XML in ColdFusion
          Level 7
          Sure, CF could process XML received in an E-mail, submitted from a form
          text field, with a web service just to name a few ways.

          XML is simply structured text. Find a way to send the text to CF then
          it is easy to parse it into XML and be on your way.
          • 2. Re: Receiving Sent XML in ColdFusion
            jimmy.hunt Level 1
            I'm needing to allow a user to send xml so that I can parse it. Can someone tell me the best way to create a web service to accept xml at anytime?

            Thanks!
            • 3. Re: Receiving Sent XML in ColdFusion
              Level 7
              I'm needing to allow a user to send xml so that I can parse it. Can
              someone tell me the best way to create a web service to accept xml at
              anytime?

              Thanks!

              You create a ColdFusion Component (CFC) file. In that file you create a
              function with an "access" parameter set to remote. This function has an
              argument that excepts either a String or XML (your choice). You then
              place this CFC on a web server and give the URL of this file to whomever
              you want to use this web service. I.E.
              www.yousite.com/yourWebservice.cfc?wsdl.

              Viola you have a web service that accepts XML at any time. You'll
              probably want to add a bit more to the code that actually does something
              with the XML.

              Make sure this web service is not in a directory that has an
              Application.CFC with an onRequest function or has Windows Integrated
              Security. Web Services can not work in either of these situations.