none
How to set the mustUnderstand attribute in the SOAP header RRS feed

  • Question

  • Hi.

    I'm writing a WCF client. The web services server is written in another programming language. I'm only provided with a WDSL file. I add the WDSL file from Visual Studio 2008 by choosing "add service reference". A set of proxy classes are generated correctly (my point is, I don't get any WDSL errors). 

    When I try to access the service I receive an error related to the "mustUnderstand" attribute in the SOAP header. When I inspect the SOAP header I can easily see that this attribute is not set. How can I do this...? 

    It is worth mentioning that when I import the wdsl file in Eclipse, the mustUnderstand flag is available to me from code. When I set mustUnderstand to true, everything works fine.
    Monday, October 20, 2008 3:51 PM

Answers

  • soumoh said:
    A set of proxy classes are generated correctly (my point is, I don't get any WDSL errors). 

    Did the generated code included classes decorated with the MessageContract attribute?

    When I try to access the service I receive an error related to the "mustUnderstand" attribute in the SOAP header. When I inspect the SOAP header I can easily see that this attribute is not set. How can I do this...?

    You can cause it to be set by specifying that the message header is required. See Nicholas Allen's blog post on this for more info.

    HTH!

    --

    Regards,

    Travis Spencer

    • Marked as answer by edhickey Wednesday, October 29, 2008 6:06 PM
    Wednesday, October 22, 2008 2:34 PM