Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

consume SOAP web service

How do I consume this SOAP web service? how do I add the request header?

https://www.eway.com.au/gateway/ManagedPaymentService/test/managedCreditCardPayment.asmx?op=CreateCustomer


REF: http://www.eway.com.au/Developer/eway-api/token-payments.aspx

like image 255
001 Avatar asked Nov 26 '10 10:11

001


People also ask

How do you consume SOAP web services?

Run the Target Web Service Locally Follow the steps in the companion guide or clone the repository and run the service (for example, by using mvn spring-boot:run ) from its complete directory. You can verify that it works by visiting http://localhost:8080/ws/countries.wsdl in your browser.

What is consuming web services?

"Consume" means that the Web service successfully fulfills the web client's request. Context of Use: An end user performs a task on a web client that requires consumption of a Web service.

What is SOAP web services?

SOAP (Simple Object Access Protocol) is a message protocol that enables the distributed elements of an application to communicate. SOAP can be carried over a variety of standard protocols, including the web-related Hypertext Transfer Protocol (HTTP).


1 Answers

The easiest way is to use .NET's built-in support.

In Visual Studio, right click on your project references and 'Add Service Reference'. Give it the service URL https://www.eway.com.au/gateway/ManagedPaymentService/managedCreditCardPayment.asmx and it will generate a proxy class for you that will do all the work. You can then just e.g.

var client = new eWayServiceReference.managedCreditCardPaymentSoapClient();
client.CreateCustomer(...);

Alternatively you can generate the proxy class from a VS command prompt using svcutil.

like image 105
Rup Avatar answered Oct 13 '22 20:10

Rup