• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML POST not sucessful

Participant ,
Feb 23, 2014 Feb 23, 2014

Copy link to clipboard

Copied

Hi,

My ColdFusion 10 server is not responding to http POST requests with XML body (like you use for web services or soap requests).

I need to setup a web services interface on my server that allows to accept XML form submits from the Adobe DPS server.

(http://www.adobe.com/devnet/digitalpublishingsuite/articles/dps-entitlement.html)

I have been using Ben Nadel's posting to get up to speed on XML post submits (http://www.bennadel.com/blog/745-Posting-XML-With-ColdFusion-CFHttp-And-CFHttpParam.htm), but I'm running into a problem because it seems my ColdFusion 10 server (on windows 7, with IIS) is not responding to XML POST requests. I've build a simple post cfm script, and a receiver cfm script, but any request is only timing out.

If I do a simple POST with formfields, then it works:

<!--- Set the URL. --->
<cfset strURL = "my server" />

<!--- Create the XML data to post. --->
<cfsavecontent variable="strXML">
    <credentials>
        <emailAddress>joeblank@smooth.com</emailAddress>
        <password>stupid</password>
    </credentials>
</cfsavecontent>

<cfhttp timeout="50"
    url="#strURL#" method="POST" result="request_results">

   <cfhttpparam type="FORMFIELD" name="username" value="thisuser">
    <cfhttpparam type="FORMFIELD" name="password" value="that1234">
</cfhttp>

<cfdump var="#request_results#">

If I replace the formfield httpparams with a XML type httpparam then the request just times out.

<!--- Set the URL. --->
<cfset strURL = "my server" />

<!--- Create the XML data to post. --->
<cfsavecontent variable="strXML">
    <credentials>
        <emailAddress>joeblank@smooth.com</emailAddress>
        <password>stupid</password>
    </credentials>
</cfsavecontent>

<cfhttp timeout="50"
    url="#strURL#" method="POST" result="request_results">

    <cfhttpparam

                type="XML" value="#strXML.Trim()#"

            />

</cfhttp>

<cfdump var="#request_results#">

I searched on the web and have not found any solution. Currently I assume the problem is somewhere with firewall, or IIS, because that's the part I don't know much about how to find the issue or fix it.

I did verify with Fiddler that my request is sent sucessfully from my development server to my development server, as well as from my development server to an ISP hosted production server, but both servers do not respond.

Any help is very much appreciated!

Thanks

Franz

TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2014 Feb 24, 2014

Copy link to clipboard

Copied

LATEST

<credentials>

        <emailAddress>joeblank@smooth.com</emailAddress>

        <password>stupid</password>

    </credentials>

That isn't really XML. What about adding the XML declaration, allowing no space between it and the cfsavecontent tag. Something like:

<cfsavecontent variable="strXML"><?xml version="1.0" encoding="UTF-8"?><credentials>

        <emailAddress>joeblank@smooth.com</emailAddress>

        <password>stupid</password>

    </credentials>

</cfsavecontent>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation