SAP için .Net C# SOAP Web Service Client Örneği

Features are:

  • Using SOAP 1.1
  • Basic authentication over HTTP
  • Specifying endpoint

Vs üzerinde “Add Service Reference”

 

Servis url  adresini  ekliyoruz.

 

servis’i  namespace’e ekliyoruz.

using ConsoleApplication4.ServiceReference2;

 

And the example code block:

static void Main(string[] args)
{

	BasicHttpBinding binding = new BasicHttpBinding();
	binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
	binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;

	EndpointAddress endpoint = new EndpointAddress("http://hostname:port/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_SENDER_SYSTEM0&receiverParty=&receiverService=&interface=SI_SEND_ORG_DATA&interfaceNamespace=http://example.com/HR/OrganisationData");
	SI_SEND_ORG_DATAClient client = new SI_SEND_ORG_DATAClient(binding, endpoint);

	client.ClientCredentials.UserName.UserName = "Username";
	client.ClientCredentials.UserName.Password = "Password";

	ZHRS_SEND_ORG_LINE[] result = client.SI_SEND_ORG_DATA("1234");

	System.Console.WriteLine(result[0].VORNA);
	System.Console.ReadLine();
}

Herhangi bir sorunuz olursa , yorum bölümünde sormayı unutmayınız.

İyi çalışmalar.

Kaynak : https://blogs.sap.com/2017/05/08/.net-c-soap-web-service-client-example-for-sap-pipo-services/

You may also like...

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.