0 Replies Latest reply on Oct 6, 2006 11:14 AM by v1lla1n

    Trouble with client for .NET web service.

      The issue I have encountered with is that while writing the web service on c# one of the parameters of the method that should be used is a array of structure. The issue is actually that the client written on ColdFusion doesn’t see my method and while launching it crashes it and displays the error. "Web service operation "test" with parameters {t2={{A={[{PRICE={12},NAME={Myname}}]}}}} could not be found. "

      When I’m sending just a structure "t" and receiving it on .NET’s side as test_c, then it's start working. But I have to deliver and get the array structure "t".

      My question is what is the right way to declare the variables in the web service? (It is not advisable to change the client as I’m writing the web service for the client and not vice verse.)

      < cfscript>
      a = ArrayNew(1);
      t.price = 12;
      t.name = "Myname";
      a[1] = t;
      t2.a = a;
      < /cfscript>
      < cfinvoke webservice=" http://localhost:2851/test/Service21.asmx?WSDL" method="test" returnvariable="wsResult">
      < cfinvokeargument name="t2" value=#t2#/>
      < /cfinvoke>
      < cfoutput>#wsResult#< /cfoutput>


      [SoapTypeAttribute(Namespace = " http://dts")
      public class postback_response
      public double crl_id;
      public double resp_code;
      public string resp_message;
      [SoapTypeAttribute(Namespace = " http://dts")
      public struct test_c2
      public test_c[] a;
      [SoapTypeAttribute(Namespace = " http://dts")
      public class test_c
      public double price;
      public string name;

      [WebMethod(), SoapRpcMethod(Use = System.Web.Services.Description.SoapBindingUse.Literal)]
      public postback_response test(test_c2 t2)

      postback_response response = new postback_response();
      response.crl_id = 1;
      response.resp_code = 0;
      response.resp_message = "test";
      return response;