On 7/5/05, Anthony Prato <[EMAIL PROTECTED]> wrote:
> (MX7/Win2K/IIS)
> There are a number of ways to post XML over http, such as the MSXML
> object. How can I setup a coldfusion page to receive these posts? To
> my knowledge the xml comes in as a different content type (in
> comparison to a standard form) so #Form.Somevar# won't work. In asp
> you would do this:
> 
> If Request.ServerVariables("REQUE­ST_METHOD") = "POST" And _
>    Request.ServerVariables("CONTE­NT_TYPE") = "text/xml" Then
>     Set myXml = CreateObject("msxml2.domdocume­nt")
>     myXml.async = False
>     myXml.load Request
> Else
>     'not posted xml
> End If
> 
> there is corresponding coldfusion code for all of this except the line:
>     myXml.load Request
> 
> How would this be done in coldfusion? (NOT using event gateways)
> 
> On a side note, what is the most preferable way in MX to post XML over
> http to services such as the DHL or UPS tracking interface?
> 
> Thanks in advance,
> Anthony


You can use the "content" variable from the GetHttpRequestData()
result object.  All data after the HTTP Request Headers will be put
into the content variable.

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000482.htm

The content variable will hold the raw XML data as a string, so then
use XMLParse(trim(result.content)) to convert it to an XML Object for
further manipulation.


-- 
Steven Erat
http://www.talkingtree.com/blog/
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211167
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to