Skip to main content
January 20, 2010
Question

Consume Web Service In Coldfusion Error

  • January 20, 2010
  • 4 replies
  • 6730 views

I'm having a problem using cfinvoke or adding this web service url in the coldfusion admin.

<cfinvoke returnvariable="returndata" webservice="http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl" refreshwsdl="yes" method="PostData">

I get the error for cfinvoke

"Cannot generate stub objects for web service invocation. "

"Name:

http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl. WSDL:

http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl. java.io.IOException: ERROR: Missing element inFault "SQLException" in operation "SQLException", in binding GetRates It is recommended that you use a web browser to retrieve and examine the requested WSDL document to ensure it is correct. If the requested WSDL document cannot be retrieved or is dynamically generated, it is likely that the target web service has programming errors. "

and in the administrator

""Error creating web service. Please ensure that you have entered a correct Web Service name or URL.""

The url is 

http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl

page loads fine in a browser...

I do see an issue being brought up here in the wsdl, but I have no idea why...this isnt my wsdl btw..

<wsdl:operation name="GetRates">
<wsdl:input message="ns:GetRatesRequest" wsaw:Action="urn:GetRates"/>
<wsdl:output message="ns:GetRatesResponse" wsaw:Action="urn:GetRatesResponse"/>
<wsdl:fault message="ns:SQLException" name="SQLException" wsaw:Action="urn:GetRatesSQLException"/>
</wsdl:operation>
line 3

any ideas?

Thanks for any help...

This topic has been closed for replies.

4 replies

January 21, 2010

The problem was the WSDL, they are using Axis2 to generate it, which generates SOAP 1.1 and 1.2 bindings in the WSDL file. CF uses Axis1, which has trouble with SOAP1.2 in wsdl.

I switched the code to use SOAP 1.1 and it works fine..wish CF updated this but oh well

Participant
September 18, 2012

Could you please detail what code you altered to have CF9 properly interact with the service?

September 18, 2012

Is this a forte specific question or a SOAP1.1 SOAP 1.2 specific question?

January 21, 2010

The problem was the WSDL, they are using Axis2 to generate it, which generates SOAP 1.1 and 1.2 bindings in the WSDL file. CF uses Axis1, which has trouble with SOAP1.2 in wsdl.

I switched the code to use SOAP 1.1 and it works fine..wish CF updated this but oh well

Inspiring
January 21, 2010

The lack of support for SOAP 1.2 is an issue that is often debated. The problem is that supporting it will require a move to a newer Axis version which will cause backward compatibility problems.

If you feel that support for SOAP 1.2 is more important then backward compatibility, go to http://www.adobe.com/go/wish/ and make yourself heard.

Inspiring
January 23, 2010

Jochem, I don't know that that's the best advice re where to raise an issue with Adobe, these days: that's just a communications blackhole.  They have a public-facing issue-tracker now: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html.  I recommend people use that instead.

--

Adam

January 20, 2010

err sorry should be PostLead

<cfinvoke method="PostLead" returnvariable="returndata" webservice="http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl" refreshwsdl="yes">

Inspiring
January 20, 2010

That method requires several arguments.  Your OP does not show you passing any.

January 20, 2010

Sorry didnt post everything for the sake of space

I just ended up using .NET to deal with the service..CF just didnt even recognize the url as a valid web service let alone care if I was passing arguments to it.

On a side note, CF admin doesnt recognize the url as a web service and dreamweaver doesnt recognize the url as a web service either.

<cfinvoke method="PostLead" returnvariable="returndata" webservice="http://www.fortedata.com:8080/axis2/services/FdsWebService?wsdl" refreshwsdl="yes">
<cfinvokeargument name="SpecVersion" value="0">
<cfinvokeargument name="ForteId" value="TESTID">
<cfinvokeargument name="AuthKey" value="guestauthenticationkey">
<cfinvokeargument name="LastName" value="0">
<cfinvokeargument name="FirstName" value="0">
<cfinvokeargument name="Address" value="0">
<cfinvokeargument name="city" value="0">
<cfinvokeargument name="state" value="0">
<cfinvokeargument name="zip" value="0">
<cfinvokeargument name="year" value="0">
<cfinvokeargument name="vin" value="0">
<cfinvokeargument name="make" value="0">
<cfinvokeargument name="model" value="0">
<cfinvokeargument name="phone" value="0">
<cfinvokeargument name="crdate" value="0">
<cfinvokeargument name="listcode" value="0">
<cfinvokeargument name="odometer" value="0">
<cfinvokeargument name="dually" value="0">
<cfinvokeargument name="commercial" value="0">
<cfinvokeargument name="convvan" value="0">
<cfinvokeargument name="coverage" value="0">
<cfinvokeargument name="term" value="0">
<cfinvokeargument name="deduct" value="0">
<cfinvokeargument name="av" value="0">
<cfinvokeargument name="gps" value="0">
<cfinvokeargument name="wt" value="0">
<cfinvokeargument name="sg" value="0">
<cfinvokeargument name="emis" value="0">
<cfinvokeargument name="fintype" value="0">
<cfinvokeargument name="finterm" value="0">
<cfinvokeargument name="downpay" value="0">
<cfinvokeargument name="cuscost" value="0">
<cfinvokeargument name="paymeth" value="0">
<cfinvokeargument name="cc" value="0">
<cfinvokeargument name="expdt" value="0">
<cfinvokeargument name="ccid" value="0">
<cfinvokeargument name="routing" value="0">
<cfinvokeargument name="banacct" value="0">
<cfinvokeargument name="checking" value="0">
<cfinvokeargument name="fbdt" value="0">
<cfinvokeargument name="promo" value="0">
<cfinvokeargument name="timeofday" value="0">
<cfinvokeargument name="prefmeth" value="0">
<cfinvokeargument name="email" value="0">
</cfinvoke>

Inspiring
January 20, 2010

Um... that web service doesn't have a PostData method...

--

Adam