0

I am trying to use a web service in my asp.net project. I add the web reference and trying to use the some of the functions of that service.I am trying to fetch some values from the web service.For this process First I am sending some data to web service for process.This is the code which I am trying to use

 wsezp.ApiService ws = new wsezp.ApiService();
        ws.Recharge("589746656", "608669", "1234567890", "5", "10", "12345");
        wsezp.Result rs = new wsezp.Result();
        string Requestid = rs.reqid;
        string Status = rs.status;
        Response.Write("Status of Requestid " + Requestid + "is " + Status);

As per my Document I will get my result like this

<recharge>
<reqid>0000<reqid/>
<status>SUCCESS</status>
<remark>recharge_transaction_id</remark>
<balance>your api balance</balance>
<mn>mobile number</mn>
<field1>operator transaction id</field1>
</recharge>

But I am getting null in the strings which I declare. Please tell me how can I use the web service for post the request and get back the result from the web service

7
  • See what is the exact result using a tool like fiddler. Commented Nov 7, 2014 at 12:33
  • It does not get anything on fiddler I check it too @sdeep Commented Nov 7, 2014 at 12:36
  • Is your web service getting hit ? If yes, what parameters is it getting exactly ? What is getting in and is there any exception ? Commented Nov 7, 2014 at 12:40
  • when I hit my recharge function i get the result ws.Result @sdeep Commented Nov 7, 2014 at 12:51
  • wsezp.Result rs = ws.Recharge(... Commented Nov 7, 2014 at 13:14

1 Answer 1

1

Looks to me as if you are creating a new result. Are sure the call to recharge doesn't return the result you are looking for ? That would make sense.

wsezp.Result rs = ws.Recharge(...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.