Skip to main content
Participant
October 23, 2008
Question

Web Services and CF

  • October 23, 2008
  • 1 reply
  • 344 views
Hello, I've just started using Coldfusion and I'm trying to invoke a Web Service:

<cfinvoke
webservice=" http://localhost/WebService1/Service1.asmx?wsdl"
method="MyMethod"
returnvariable="aString">
<cfinvokeargument name="arg1" value="1"/>
<cfinvokeargument name="arg2" value="2"/>
<cfinvokeargument name="arg3" value="3"/>
</cfinvoke>

But I get the following error:
Web service operation MyMethod with parameters {arg1={1},arg2={2},arg3={3}} cannot be found.

This is my web service method in C# .Net:
public String MyMethod(string arg1, string arg2, string arg3)
{
return "Hello World";
}

I've tried with a very similar method which just have 2 parameters (arg1, arg2) instead of 3 and it works.

Could anyone help me?

Thanks
This topic has been closed for replies.

1 reply

Inspiring
October 23, 2008
Start with the basics. Can you browse the wsdl?
newWithCFAuthor
Participant
October 23, 2008
Yes, I can browse it writting " http://localhost/WebService1/Service1.asmx?wsdl" in Explorer
I've also tried to create a save a wsdl file and then write
<cfinvoke webservice=" http://localhost/WebService1/Service1.wsdl"
...
</cfinvoke>
but I get the same error..
October 23, 2008
In the Coldfusion Administrator, go to Web Services and delete the url for that service and try it again.