如何使用ksoap2将多个参数从android发送到wcf服务器

如何使用ksoap2将多个参数从android发送到wcf服务器,android,wcf,ksoap2,Android,Wcf,Ksoap2,我正在使用wcf web服务制作一个应用程序 我想发送多个参数,但我只知道这样 request.addProperty("Fahrenheit",txtData.getText().toString()); 那怎么做呢 下面是我的wcf代码的一部分 public string GetFirstName(byte[] source, int height, int width) { Bitmap bitmap = ImageTypeConverter.ArrayToIma

我正在使用wcf web服务制作一个应用程序

我想发送多个参数,但我只知道这样

request.addProperty("Fahrenheit",txtData.getText().toString());
那怎么做呢

下面是我的wcf代码的一部分

public string GetFirstName(byte[] source, int height, int width)
    {
        Bitmap bitmap = ImageTypeConverter.ArrayToImage(source, height, width);
        bitmap.Save(Environment.CurrentDirectory + "test" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);

        return "ImageSaveComplete";
    }
如您所见,我想传递字节数组和整数值


请告诉我答案。

要发送多个参数、字符串、整数等:

SoapObject request = new SoapObject(NAMESPACE, METHOD);

    PropertyInfo variableHeight = new PropertyInfo(); 

    variableHeight.setName("height");
    variableHeight.setValue(value); // your variable value
    variableHeight.setType(Integer.class); // if its string type change to String.class
    request.addProperty(variableHeight);

    PropertyInfo variableWidth = new PropertyInfo();

    variableWidth.setName("width");
    variableWidth.setValue(value);
    variableWidth.setType(Integer.class);
    request.addProperty(variableWidth);
但对于发送字节数组,我不确定,请看以下内容: