1

We are trying to develop a client to consume an Axis2 service.

This is the method that we are trying to get data with :

        var binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
        binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
        binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;



        EndpointAddress address = new EndpointAddress("https://example.com/Axis2/xxxService");    
        WindowsFormsApplication1.XSVC.xxxServicePortTypeClient soap_xxx = new WindowsFormsApplication1.XSVC.xxxServicePortTypeClient(binding, address);

        soap_xxx.ClientCredentials.UserName.UserName = "USERNAME";
        soap_xxx.ClientCredentials.UserName.Password = "PASSWORD";
        WindowsFormsApplication1.XSVC.xxxDataRequest insReq = new WindowsFormsApplication1.XSVC.xxxDataRequest();
        insReq.clientIP = "1";
        insReq.barcodeData = this.INPUT.Text;
        WindowsFormsApplication1.XSVC.xxxDataResponse insRes = new WindowsFormsApplication1.XSVC.xxxDataResponse();

       // soap_xxx.Open();

        insRes = soap_xxx.checkXXXData(insReq);

Currently we are getting this error:

WSDoAllReceiver: Incoming message does not contain required Security header

.Net framework version is 4.0, developed on VS 2012

We couldn't implement custom header for it, are there any other workarounds or good documentation to implement WSSE security custom header?

Thank you for your time

kayhan yüksel
  • 378
  • 2
  • 9
  • 24

0 Answers0