'How can I send a soap request using flutter with two arguments and a wsdl

I am trying to send a soap request with two arguments using flutter. The wsdl can be found at this address

I didn't found any ways to only send a request with two arguments. I saw some comments on a different post using the http package but it doesn't really answer my question.

What I need is, being able to send a request with a "country" and a "weight" argument, at the link above, and it'll return the price.

NB : I'm relatively new to flutter



Solution 1:[1]

Hi I think you need to send get or post request to this url so you may need to use one of these libraries either dio or http i usually use dio for this and to send get request for this link for example like below

    Response response = await Dio().get("https://info802-serveur-soap.herokuapp.com/pricecalculator?wsdl&country=egypt&weight=10");

this for get request

and for post request you can use this

response = await dio.post("/test", data: {"country": "egypt", "weight": "10"});

i hope this useful for you and also you can make a delete , patch , update requests using dio

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohamed Nagdy