Byte array lost during WCF serialization process RRS feed

  • Question

  • Configuration:

    • I have the following WCF based service/clients set up:
      Client <=> Gateway <=> Service
    • The binding between the Gateway and the Service is a WS-Security custom binding and the binding between the Gateway and the Client is basicHttpBinding.
    • The data being exchanged is a Person object which has string name, int id, byte[] photo, byte[] certificate, byte[] code, etc.
    • The Service is a third party WCF service.


    The client is requesting a Person object from the Service via the Gateway. In the response, the Gateway is receiving the byte[] type photo and certificate from the Service, but when it's sending out the response to the Client, the byte array is lost during serialization and in the outgoing message I see <d4p1:photo></d4p1:photo>, <d4p1:certificate></d4p1:certificate>, <d4p1:code></d4p1:code>. Regardless of the size of the byte array, the data is missing (the code array is only about 12 bytes long). There is no error or warning logged in the WCF trace log.

    Any insight/suggestion would be highly appreciated.

    Thanks in advance!



    • Edited by mn-wa Thursday, September 11, 2014 4:54 PM
    Thursday, September 11, 2014 4:46 PM


  • Hi,

    Hope the following links help:

    Friday, September 12, 2014 10:07 AM