1

I have added a service reference to my UWP app project.

I seems everything have been generated correctly, according to the WSDL.

The problem is that I don't know how can I add a SOAP header to every message. The reference generated includes a CustomHeader object (a POCO), with all the fields needed according to the request descripcion but I don't know how to either include a soap header and to add this custom header to it, via the generated request (or the generated ClientBase).

Thanks in advance!

gemasr
  • 187
  • 1
  • 6
  • Maybe this link can help you: http://stackoverflow.com/questions/964433/how-to-add-a-custom-header-to-every-wcf-call – Ricardo Pontual Aug 16 '16 at 13:32
  • I have tried that already, but in this line `httpRequestMessage.Headers.Add(USER_AGENT_HTTP_HEADER, this.m_userAgent);` it issues an error because it says `Headers` is read only. Thanks anyway! – gemasr Aug 16 '16 at 14:14

0 Answers0