0

I want to pass one JBSearchRequest object which contains List<JBCredential> to my asp.net web service. I am able to call this web service from SOAP UI and some other tools but when I'm trying to send request from my C# client code is giving problem.

My Web service class is

    public List<JBCredential> JBCredentials{ get; set; }
    public string codes { get; set; }
    public string db { get; set; }
    public string locale { get; set; }
    public string location { get; set; }
    public string mode { get; set; }
    public string postcode { get; set; }

I've tried the following

 test.JBSearchRequest s = new test.JBSearchRequest();
 test.JBCredential jb = new test.JBCredential();
    jb.code = "LNK";
    jb.Username = "";
    jb.Password = "";
    /
    s.query = "java";

    s.mode = "mock_search";
    s.JBCredentials.Add(jb);//I'm not getting add method

      so I've tried like this
    s.JBCredentials[0].code = jb.code;
    s.JBCredentials[0].Password = jb.Password;
    s.JBCredentials[0].Username = jb.Username;
   and also I tried
   List<JBCredential> ad=new List<JBCredential>();
   ad.Add(jb);
   s.JBCredentials=ad;

Please help me how to pass object which contains list when we are consuming web service.


I have installed libpq-dev library

sudo apt-get install libpq-dev

it helped ;)

4

0 に答える 0