Validate RSS feed using cfinvoke and the W3C validation service (soap 1.2)

Posted on 2009-12-16
Last Modified: 2013-12-24
Hi experts:
I am writing an application for a client to allow them to create RSS feeds.  I would like to integrate the validation of the feeds. Usually to validate, I would go to and type in the URL.  I'd like to make this "seamless" for the client by just invoking the service and capturing any errors generated.  I am writing in coldfusion and after looking at the documentation for w3c, I came up with this:

<cfinvoke webservice="" method="post" result="MyReturnVar">
 <cfinvokeargument name="url" value="">
 <cfinvokeargument name="output" value="soap12">

I don't know what method to actually use.  Here is a link to the documentation:

When I run this, I get an error:
Could not generate stub objects for web service invocation. Name: WSDL: WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{}definitions'.: It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness. If the requested WSDL document can't be retrieved or it is dynamically generated, it is likely that the target web service has programming errors.

Any idea what might be gong on and how I can invoke this?

Question by:snix123
    LVL 27

    Accepted Solution

    w3c's feed validator service is not a webservice per se...
    the way to 'invoke' it is not using <cfinvoke>, but with a regular http request using <cfhttp>

    here's the code you need:

    <cfhttp url="" method="get" result="vResult" timeout="360">
    <cfif val(vResult.Statuscode) eq 200>
      <cfset vXML = xmlparse(vResult.filecontent)>
      <cfset xmlroot = vXML.xmlRoot['env:Body']['m:feedvalidationresponse']>
      <cfif xmlroot['m:validity'].XmlText>
        <p style="font-weight:bold">Congrats, the feed is valid!</p>
        <p style="font-weight:bold">Sorry, the feed did not validate...</p>
        <cfset arrErrors = xmlroot['m:errors']['m:errorlist'].XmlChildren>
        <cfloop from="1" to="#arraylen(arrErrors)#" index="x">
          <cfoutput>#x#: #arrErrors[x]['text']# (line #arrErrors[x]['line']#, column #arrErrors[x]['column']#)<br></cfoutput>
      <!--- cfhttp call returned an error, i.e. is not available or timed out --->


    Author Comment

    Thank you so much Azadi:
    THis works great, but I have to ask how you came up with the solution.  I'm not all that familiar with the XML tags for CF, so I know I have to review that.  Is there a text or website you could recommend?  Thanks!  
    LVL 27

    Expert Comment

    cf livedocs is a great place to start:

    i would suggest going through all the tags and functions, and reading up on those you are not familiar with.
    you can also download a free PDF of CFML Reference from here:

    and while you are there make sure you download the CF Developers Guide pdf as well:

    all the above links are for CF9, but you can get to CF8's livedocs from there.


    Featured Post

    Superior storage. Superior surveillance.

    WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

    Join & Write a Comment

    One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now