XML via UDP
I am trying to send an XML request via UDP to a local server using CFML. I found the activesocket library that allows for UDP communications via ColdFusion but I'm having trouble getting the UDP object to communicate. I have used their sample Telnet application and it connects and works fine. Is there an easier way to pass XML data via UDP from ColdFusion? A portion of the code I'm using is below. I am sending the data by clicking a form button and trying to pass the strXML variable to the objUdp.SendBytes function. I have tried removing everything except the simple objUdp.open function and it still gives me the following error:
An exception occurred when accessing a Com object field. | |
| The cause of this exception was that: AutomationException: 0x80020003 - Member not found.. | |
<cfsavecontent variable="strXML">
<Immediate-Location-Request>
<request-id>100</request-id>
<query-info>
<ret-info ret-info-time="YES" ret-info-accuracy="YES"/>
<request-speed-hor/>
</query-info>
</Immediate-Location-Request>
</cfsavecontent>
<cfif IsDefined("URL.submitbutton")>
<!--- creating the object --->
<cfobject class="ActiveXperts.Udp" type="com" name="objUdp" Action="Create">
<!--- connect to host --->
<cfscript>
objUdp.open(URL.host, URL.port, "False");
objUdp.SendData "strXML"
objUdp.Close
</cfscript>
