Search code examples
web-servicessoapcoldfusionwsdlasmx

Consuming .asmx webservice using coldfusion error


I am trying to consume .asmx webservice in coldfusion. I can view the WSDL but when trying to access methods it gives me the error: Webservice Operation ... with parameters ... cannot be found

I have tried to add refreshwsdl = true as stated in other similar stackoverflow questions with no luck.

What am I missing?

<cfinvoke webservice = "urlhere.asmx?wsdl"
method="LoginRequest"
ReturnVariable ="result"
refreshwsdl="true" >

    <cfinvokeargument name="oid" value="a">
    <cfinvokeargument name="username" value="b">
    <cfinvokeargument name="password" value="c">

</cfinvoke>

Here is that part of the WSDL:

<s:schema elementFormDefault="qualified" targetNamespace="http://blahblah">
<s:element name="loginRequest" type="s0:LoginRequest" />
<s:complexType name="LoginRequest">
<s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="oid" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>

Any ideas ?

Thanks!


Solution

  • You can try with the method described in the below link.

    http://www.mindfiresolutions.com/ColdfusionMaking-a-call-to-a-Web-Service-with-complex-object-as-input-parameter-1228.php