Multiple Headers with name 'RelatesTo' in response RRS feed

  • Question

  • I am invoking a 3rd party web service which happens to be built in Java/AXIS.  I am using WCF by way of BizTalk Server.  Generally speaking, it works.  Successful requests are handled just fine.  However when the service throws a Fault, WCF doesn't seem to like it because in the header of the fault, there are two 'RelatesTo' headers like so:

    <soapenv:Envelope xmlns:soapenv="">
       <soapenv:Header xmlns:wsa="">
          <soapenv:Fault xmlns:axis2ns492="">
             <faultstring>Student record not found.</faultstring>

    When the fault is received and handled, I get the following exception:
    System.ServiceModel.MessageHeaderException: Multiple headers with name 'RelatesTo' and namespace '' found.

    According to the provider of the service, this is valid, and they reference the below link at

    1) Is this actually valid?

    2) Does WCF handle this in some way? 

    If there is a way to handle this, I would like to know if it is possible without writing some exotic code.  Currently I am using a basic binding with the native WCF adapter in BizTalk and would prefer not to do anything else. 


    Thursday, May 16, 2013 1:21 PM


All replies

  • Hi, from the document you need set the RelationshipType, these two cannot be exatcly the same.
    Friday, May 17, 2013 8:33 AM
  • Thank you Nico_He.  From my reading of the document it does not seem to specify that the RelationshipType needs to be explicitly set or that the two RelatesTo fields cannot be identical, simply that more than one is allowed and the RelationshipType can be specified if the default value is not desired. 

    I have been trying to find examples or other documentation which expands on this, however it does appear to be open to interpretation.  I agree that it is silly that the service provider has implemented it in this way, but strictly speaking I don't think they have violated the rules of the spec.  The xml soap response also is valid according to the schemas for SOAP envelope and ws-addressing.

    In the interest of interoperability, it seems to me that WCF should handle this case, unless I can find evidence that this goes against the SOAP spec.

    Friday, May 17, 2013 5:33 PM
  • Hi, for this issue, you would post a feature request at
    Monday, May 20, 2013 2:47 AM