1

I am working through a legacy project .

 {
  using(var scope = new OperationContextScope(client.InnerChannel)) {
    var appKeyMsgHeader = new MessageHeader < string > ("app1"); //Input parameter passed to the current method
    var appKeyUnTypedHeader = appKeyMsgHeader.GetUntypedHeader("AppKey", "Au.CustomHeaders");
    OperationContext.Current.OutgoingMessageHeaders.Add(appKeyUnTypedHeader);
    client.InnerChannel.OperationTimeout =
      TimeSpan.Parse(ConfigurationManager.AppSettings[BatchConstants.DisPatcherClientOperationTimeout]);
    output = client.Process(input);
  }
}, appKey);

This is the code for consuming the WebService. But I don't know how to consume the same from SOAP UI. Adding the simple header is not working. There is some tricky part with namespace and header. How to pass this through SOAP UI?

shanavascet
  • 589
  • 1
  • 4
  • 18
  • You can check out these docs to see if that helps.https://www.soapui.org/docs/soap-and-wsdl/headers and https://stackoverflow.com/questions/21277999/soapui-automatically-add-custom-soap-headers-to-outgoing-request – Lan Huang May 26 '22 at 02:41

0 Answers0