0

Calling a SOAP webservice as below. Security used by the client is Wsse security

DD.WritePortTypeClient client = new DD.WritePortTypeClient();
using (OperationContextScope scope = new OperationContextScope(client.InnerChannel))
{
OperationContext.Current.OutgoingMessageHeaders.Add(
                                                new SecurityHeader("Username", "Password"));

ResponseType result_obj = new ResponseType();

result_obj =   client.createPolicies(inputobj);
client.Close();
}

The wsse security is doing dynamically using SecurityHeader()

The code is running without any error but the result_obj is coming as null.
What am i missing here.

Edit1

Checked the same as in Comment using Fiddler4. The response is coming there. But at program the object is coming as null.

Sachu
  • 7,555
  • 7
  • 55
  • 94
  • Use a tool that shows the actual SOAP requests that you code uses, (something like Fiddler4) and compare that with postman. You are probably missing some headers. – Neil Jul 01 '22 at 19:05
  • @Neil installed Fiddler4 and checked the same response is coming successfully at fiddler4..but application giving null – Sachu Jul 02 '22 at 07:55
  • OK, so that means the deserialsation is incorrect. – Neil Jul 02 '22 at 16:53
  • @Neil yes, contacted the web sevice provider..they saying the wsdl is correct.. – Sachu Jul 03 '22 at 09:58

0 Answers0