Restsharp support webservice automationtesting like rest

0 votes

Hi ,

Restsharp support webservice automationtesting like rest .

i want to automation webservice using C# . if Restsharp supports share same sample code.

sample uri : http://currencyconverter.kowabunga.net/converter.asmx

RestClient client = new RestClient("http://currencyconverter.kowabunga.net");
            RestRequest request = new RestRequest("/converter.asmx", Method.GET);

             request.AddParameter("CurrencyFrom", "USD", ParameterType.GetOrPost);

            request.AddParameter("CurrencyTo", "INR", ParameterType.GetOrPost);

            request.AddParameter("RateDate", "2018-12-07", ParameterType.GetOrPost);            
   IRestResponse response = client.Execute(request); //StatusCode: OK, Content-Type: text/html; charset=utf-8, Content-Length: 6651

          //  JsonDeserializer des = new JsonDeserializer();
            XmlDeserializer des = new XmlDeserializer();

            var res = des.Deserialize<Dictionary<string, string>>(response); // getting error here like below

System.Xml.XmlException: 'The 'p' start tag on line 108 position 16 does not match the end tag of 'ul'. Line 110, position 17.

Expected result : <decimal xmlns="http://tempuri.org/">70.802040277899920851288365139</decimal>

thanks

Aug 9, 2020 in Java by anonymous
• 3,190 points
2,046 views

Hello,

Would you please provide more information about what you are trying to do?

Hi Niroj,

i have to automate webservices .

1) restsharp support rest api automation, and is it support webservices also ...?

2) is there any different thing we have for webservices  like restsharp .

Hi, @Sri,

Did you convert your response to class with the help of JSON 2C# using any converter?  You need to create a user in your project. Have you done it till that?

Hi ,

Coul d u plz share any samples please

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
3 answers

Does Java support Default Parameters?

You can try this with method overloading. void ...READ MORE

answered Sep 21, 2018 in Java by Sushmita
• 6,920 points
6,976 views
0 votes
1 answer

does java support operator overloading?

Java doesn't supports operator overloading because it's just a ...READ MORE

answered Jun 18, 2018 in Java by Akrati
• 960 points
41,774 views
+1 vote
1 answer

What are REST clients for Java?

These are the few options : Apache CXF has ...READ MORE

answered Nov 22, 2018 in Java by Frankie
• 9,830 points

edited Nov 8 by Sunita 2,308 views
0 votes
1 answer

How can we override back button to act like home button?

Most of the time you need to ...READ MORE

answered Dec 14, 2018 in Java by Daisy
• 8,140 points
2,282 views
0 votes
1 answer

how to read csv file form sftp connection and store into string object in java code and convert into json.....post it using rest api

Hey, @Pooja, Before starting with anything you should ...READ MORE

answered May 13, 2020 in Java by Roshni
• 10,480 points
3,850 views
0 votes
1 answer

How to set base url for rest in spring boot?

Hello @kartik, Set it up in your application.yml ...READ MORE

answered May 22, 2020 in Java by Niroj
• 82,840 points
14,432 views
0 votes
1 answer

GSON fails to read/map a field with name like USERId

Hello @ RamaKrishnaRaju, You should note the Javadoc of configureMessageConverters states ...READ MORE

answered Jul 2, 2020 in Java by Niroj
• 82,840 points
2,213 views
0 votes
1 answer

Java replace : replace all charecters with space except the matched string like "test"

Hi, @jyra, You can go through this example:  String ...READ MORE

answered Oct 14, 2020 in Java by Gitika
• 65,770 points
802 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP