snix123
asked on
Validate RSS feed using cfinvoke and the W3C validation service (soap 1.2)
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 http://validator.w3.org/feed/ 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="http://validator.w3.org/feed/check.cgi" method="post" result="MyReturnVar">
<cfinvokeargument name="url" value="http://www.mysite.org/MyNews.xml">
<cfinvokeargument name="output" value="soap12">
</cfinvoke>
I don't know what method to actually use. Here is a link to the documentation:
http://validator.w3.org/feed/docs/soap.html
When I run this, I get an error:
Could not generate stub objects for web service invocation. Name: http://validator.w3.org/feed/check.cgi. WSDL: http://validator.w3.org/feed/check.cgi. WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}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?
THANKS!
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 http://validator.w3.org/feed/ 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="http://validator.w3.org/feed/check.cgi" method="post" result="MyReturnVar">
<cfinvokeargument name="url" value="http://www.mysite.org/MyNews.xml">
<cfinvokeargument name="output" value="soap12">
</cfinvoke>
I don't know what method to actually use. Here is a link to the documentation:
http://validator.w3.org/feed/docs/soap.html
When I run this, I get an error:
Could not generate stub objects for web service invocation. Name: http://validator.w3.org/feed/check.cgi. WSDL: http://validator.w3.org/feed/check.cgi. WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}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?
THANKS!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
cf livedocs is a great place to start: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/index.html
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:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/coldfusion_9_cfmlref.pdf
and while you are there make sure you download the CF Developers Guide pdf as well:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/coldfusion_9_dev.pdf
all the above links are for CF9, but you can get to CF8's livedocs from there.
Azadi
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:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/coldfusion_9_cfmlref.pdf
and while you are there make sure you download the CF Developers Guide pdf as well:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/coldfusion_9_dev.pdf
all the above links are for CF9, but you can get to CF8's livedocs from there.
Azadi
ASKER
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!