Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
Jon Cooper #1
CFINVOKE Web Services Problem
First to say I know nothing about SOAP, XML etc but need to connect to a
webservice. Running the attached code just generates a HTTP/1.1 405 Method not
allowed error which is not very informative.
Please can anyone shed any light on any errors I may have in my code?
many thanks
<CFCONTENT type="text/xml">
<CFSAVECONTENT VARIABLE="soapmessage">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Login xmlns="http://www.XYZ.com/authentication_3_1/">
<UserName>#username#</UserName>
<Password>#Password#</Password>
</Login>
</soap:Body>
</soap:Envelope>
</CFSAVECONTENT>
<cfoutput>
<CFCONTENT type="text/html">
<CFHTTP URL="http://dev.XYZ.com/clients/wsdl/authentication_3_1.wsdl"
METHOD="post" RESOLVEURL="false">
<CFHTTPPARAM TYPE="XML" VALUE="#soapmessage#">
</CFHTTP>
<cfdump var="#cfhttp#">
</cfoutput>
Jon Cooper Guest
-
CFInvoke Tag... dumb question
Hi, I would like to know if the CFInvoke tag is available for all versions of CF or just CFMX7? Is it supported on a default install? If not,... -
CFINVOKE
Hi, I've a problem invoking 2 cfc's in one function which has same return variable. please see the below code. my question is how does it affect... -
using cfinvoke
Can I use <!--- file abc.cfc---> <cfcomponent> <cffunction> <cfquery> </cfquery> <cfreturn xyz> </cffunction> </cfcomponent> -
Consuming .Net Webservice with CFInvoke
I am trying to consume a .Net Webservice and am having a problem. The webservice takes an array of string objects as a parameter, but when I try to... -
passing structures using cfinvoke.
Quick question. Can I create a structure in a cfc and then return in? If so does anyone have a simple example. Thanks. -
Fychan66 #2
Re: CFINVOKE Web Services Problem
Have you tried changing the cfhttp method from POST to GET? That's caused me problems in the past...
Fychan66 Guest
-
Mr Black #3
Re: CFINVOKE Web Services Problem
First of all, remove all <CFCONTENT> tags. Has nothing to do with what you are
trying to achieve. Instead use <CFHTTPHEADER> to set Content-Type to
"text/xml". Or <CFHTTPPARAM TYPE="XML"> already does it? Never could remeber
this. Also, usually, SOAPAction header is required, but maybe not. Check the
description of your service.
Mr Black Guest
-
Fychan66 #4
Re: CFINVOKE Web Services Problem
I'd have to agree I'm afraid. I got a version of your code running (see below)
by going to [url]http://soapclient.com/soaptest.html[/url] and asking for the Request code
to be shown (instead of the default Response) and putting that into a variable
(soapmessage). It worked just fine for me.
<cftry>
<cfset soapmessage = '<output from http://soapclient.com/soaptest.html>'>
<CFHTTP URL="http://my.mindsweep.net/MindSoap" METHOD="get"
RESOLVEURL="false">
<CFHTTPPARAM TYPE="XML" VALUE="#soapmessage#">
</CFHTTP>
<cfset tmp = XMLNew()>
<cfset tmp = XmlParse( cfhttp.filecontent, true )>
<cfdump var="#tmp#">
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
Fychan66 Guest



Reply With Quote

