I have a problem with a WebMethod which return type is a double[]. I am trying to access this method in form but result is :
Error in deserializing body of reply message for operation 'FIR'. End element 'FIRResult' from namespace 'http://google.com/' expected. Found element 'double' from namespace 'http://google.com/'. Line 1, position 278.
Example code :
private void submit_Click(object sender, EventArgs e)
{
int N = int.Parse(textBox1.Text);
int fN = int.Parse(textBox6.Text);
int fS = int.Parse(textBox5.Text);
int rippleLimit = int.Parse(textBox4.Text);
double[] result = ws.FIR(N, (double)fN, (double)fS, rippleLimit);
this.Hide();
}
[WebMethod]
public double[] FIR(int N, double fs, double fn, int rippleLimit)
{
double rippleDev;
List<double> result = new List<double>();
List<double> signal = firDesign(N, fn, fs);
DTFT(signal, N, fs, fn, 1);
List<double> moduledSignal = moduleSignal(Service1.real, Service1.img);
rippleDev = calculateRippleDev(fn, moduledSignal);
result.Add(rippleDev);
for (int i = 0; i < moduledSignal.Count; i++)
{
result.Add(moduledSignal[i]);
}
return result.ToArray();
}