Search code examples
.netweb-servicescoldfusionwsdl

AxisFault in ColdFusion when calling a .Net Webservice wsdl


AxisFault 
coldfusion.xml.rpc.ServiceProxy$ServiceInvocationException: Cannot perform web service invocation

Passing plain old strings down and receiving XML back. Other nearly identical web services work without any of the same issues.

Adding refreshwsdl="true" did not help

    <cfinvoke 
    webservice = "http://redacted.svc?wsdl"
    refreshwsdl="true"
    method="UpdateAddresses"
    returnvariable="resultXML">
    <cfinvokeargument name="Customer" value="#Customer#"  />    
    <cfinvokeargument name="addresses" value="#addresses#"  />
    <cfinvokeargument name="street_no" value="#street_no#"  />
    <cfinvokeargument name="street_no_suffix" value="#street_no_suffix#"  />
    <cfinvokeargument name="street_prefix" value="#street_prefix#"  />
    <cfinvokeargument name="street_name" value="#street_name#"  />
    <cfinvokeargument name="street_suffix" value="#street_suffix#"  />
    <cfinvokeargument name="apt_suite_unit" value="#apt_suite_unit#"  />
    <cfinvokeargument name="city" value="#city#"  />
    <cfinvokeargument name="state" value="#state#"  />
    <cfinvokeargument name="zip" value="#zip#"  />
    <cfinvokeargument name="pobox" value="#pobox#"  />
</cfinvoke> 
<cfreturn resultXML >


Solution

  • Issue turned out to be the way Coldfusion handles empty strings.

    By checking for any instances of "" in the arguments in coldfusion and replacing them with " " before invoking them as arguments in the .net wsdl service call cleared it right up. on the .net side I then stripped out the spaces. I think they may be being cast as null which causes C# to choke when it expects a string.