Skip to Content

I was helping a friend connecting to a PO Web Service from .Net. It was not straightforward enough and I haven’t found a good example so I decided to share the code with you. For simplicity, It is a console application.

Features are:

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


First, we add a Service Reference


We can give a Web URL or file path:


Add your C# namespace to the main class.

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=");
	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");


If you have any questions, please ask in the comments.



To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Alexander Apel

    Hi Fatih,

    can you please create an example with the standard webService “Adapter Message Monitoring / basic? Style = document” and “getMessageList”?
    So I have my problems with this.

    best regards,




Leave a Reply