2 Replies Latest reply on Apr 5, 2007 10:26 AM by Newsgroup_User

    Passing xml to a cold fusion page

    Level 7
      The client wants the Director exe to pass xml to a cold fusion page they
      already have on their server.
      I was told to pass it to a link that looks like this:
      http//www.domain.com/page.cfc?wsdl

      Here is the code I'm using:
      lXML ="<?xml version="&QUOTE&"1.0"&QUOTE&"
      encoding="&QUOTE&"UTF-8"&QUOTE&" ?>"
      lXML =lXML&"<!DOCTYPE cmedata SYSTEM "&QUOTE&"data.dtd"&QUOTE&">"
      lXML =lXML&"<data>"
      lXML =lXML&"<holder>"
      lXML =lXML&" <type>"
      lXML =lXML&" <password>"&(line 1 of
      field"xmlText")&"</password>"
      lXML =lXML&" </type>"
      lXML =lXML&"</holder>"
      lXML =lXML&"</data>"
      postNetText("http//www.domain.com/page.cfc?wsdl", lXML)

      What am I missing?

      Thanks for any help


        • 1. Re: Passing xml to a cold fusion page
          Level 7
          Kevin Carr wrote:
          > The client wants the Director exe to pass xml to a cold fusion page
          > they already have on their server.
          > I was told to pass it to a link that looks like this:
          > http//www.domain.com/page.cfc?wsdl
          >
          > Here is the code I'm using:
          > lXML ="<?xml version="&QUOTE&"1.0"&QUOTE&"
          <snip code>
          > postNetText("http//www.domain.com/page.cfc?wsdl", lXML)
          >
          > What am I missing?

          I think you need to read the help for postNetText again, in particular note
          the part that says

          "If a program uses the alternate form—a string instead of property list—the
          string postText is sent to the server as an HTTP POST request using MIME
          type "text/plain." This will be convenient for some applications, but is not
          compatible with HTML forms posting."

          Andrew


          • 2. Re: Passing xml to a cold fusion page
            Level 7
            I've been playing around with an swf embedded in Director MX 2004

            Here is the code I'm using:
            xmlString==
            "<cmedata><members><member><myname>Lost</myname></member></members></cmedata>";
            var login_str:String = xmlString;
            codeOne="00001";
            var xmlinfo:XML = new XML(login_str);
            xmlinfo.contentType = "text/xml";
            loadVariablesNum("http//www.domain.com/page.cfc", 0, "POST");

            This works when I'm testing it in Flash, but when I save it out as an swf
            and import it into Director it doesn't.

            The cfc needs both the "codeOne" variable and the "xmlinfo" xml for it to
            work.

            I've tried different combinations in both Director and Flash, but Flash's
            loadVariablesNum seems to be the only code that works and it doesn't work
            inside a Director exe.

            To get a Flash 8 swf to work I've had to updated Director to 10.1.1,
            unfortunatly I just updated so now I'm afraid lingo I tested yesterday that
            didn't work, might work today.

            What's Director's lingo that matches the working Flash actionscript?

            ...Or how do I code the swf so it will work in Director?

            Thanks