title: ColdFusion 9 calling .NET Web Service- Web service operation with parameters cannot be found. HELP!
body: <p>Error: Web service operation .... with parameters {part={...},storeId={...},contractId={...}} cannot be found.  </p>
  
  <p>I created a .NET web service that talks to a ColdFusion page.  What happens is when the user types a part number into the part number field then tabs out of it, the web service is called to get the appropriate pricing for that part.  How it gets the pricing is done behind the scenes, is irrelevant, and is too complicated to show on here for the sake of the point I'm trying to get across.</p>
  
  <p>Here's what I got going on- I have the ColdFusion page passing in 3 variables: <strong>part</strong>, <strong>storeId</strong>, and <strong>contractId</strong>.</p>
  
  <pre>&lt;cfset vars = structNew()&gt;
  &lt;cfset vars["contractId"] = "#Trim(Attributes.contract)#"&gt;
  &lt;cfset vars["part"] = "#Trim(Attributes.part)#"&gt;
  &lt;cfset vars["storeId"] = "#Trim(Attributes.store)#"&gt;
  
  &lt;cfinvoke webservice = "http://compassnetdev/Services/CustomerContractPartPrice.asmx?wsdl"
            method = "GetCustomerContractPrice"
            returnVariable = "price"
            argumentCollection = "#vars#"&gt;
  &lt;/cfinvoke&gt;</pre>
  
  <p>Before, I just had the <strong>contractId </strong>and the <strong>part </strong>being passed in, and it worked great.  No problems.  But since I added in the <strong>storeId</strong>, it's throwing this error message up:</p>
  
  <pre>
  Error Occurred While Processing Request  
  Web service operation GetCustomerContractPrice with parameters {part={BV410070},storeId={001},contractId={21}} cannot be found.  
  
  
  The error occurred in C:\inetpub\wwwroot\CustomTags\fn_get_price_2.cfm: line 58
  
  56 :          method = "GetCustomerContractPrice"
  57 :          returnVariable = "price"
  58 :          argumentCollection = "#vars#">
  59 : 
  60 : 
  </pre>
  
  <p>As you can see it's getting the values I'm passing in just fine.</p>
  
  <p>What I made sure of:</p>
  
  <ol>
  <li><p>I made sure that the web service address indicated above was current (meaning, I made sure that it was the latest build that contained my new parameter).</p></li>
  <li><p>I manually go to the web service, and the wsdl shows up (as expected).</p></li>
  <li><p>I can manually invoke the web service as well by going to the web service URL.  I can enter in my 3 variables and click Invoke, and it returns the correct value.</p></li>
  </ol>
  
  <p>Here's my web service code:</p>
  
  <pre>    public class CustomerContractPartPrice : System.Web.Services.WebService
      {
          [WebMethod]
          public decimal GetCustomerContractPrice(string part, string storeId, int contractId)
          {
              var context = new PricingBLL();
              decimal price = context.GetCustomerContractPartPrice(contractId, part, storeId);
              return price;
          }
      }</pre>
  
  <p>This goes out to the business object and does the work, and returns the result.  Ultimately I think that this is a ColdFusion/.NET interoperability issue.  Thoughts?</p>