I'm having a problem creating SOAP header in a .NET

Discussion in 'ASP .Net Web Services' started by Yelena, Jan 5, 2006.

  1. Yelena

    Yelena Guest

    I'm having a problem creating SOAP header in a .NET

    The required SOAP header looks like this:

    <s11:Header>
    <MessageID
    s11:mustUnderstand="1">uuid:18db2ad2-5bac-11da-a4ef-18db2ad1a4ef</MessageID>
    </s11:Header>

    But when I create a class derived from SoapHeader called MessageID
    contained public member for the element I want to include, the
    resulting SOAP fragment is this:

    <s11:Header>
    <MessageID
    xmlns="http://schemas.xmlsoap.org/ws/2004/03/addressing">
    <messageID>string</messageID>
    </MessageID>
    </s11:Header>

    Since the element is contained within the parent MessageID, the request
    fails.

    Hope someone can advise me.
    Thank you.
    Yelena, Jan 5, 2006
    #1
    1. Advertising

  2. Yelena

    Yelena Guest

    Solution:

    [XmlRoot("MessageID",Namespace =
    "http://schemas.xmlsoap.org/ws/2004/03/addressing")]
    public class MessageID: SoapHeader
    {
    [XmlTextAttribute]
    public string messageid;
    }
    Yelena, Jan 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mlt
    Replies:
    2
    Views:
    832
    Jean-Marc Bourguet
    Jan 31, 2009
  2. datagrid having row header and column header

    , Jul 13, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    183
  3. Andreas Remsperger

    Creating SOAP Header with namespace pefix

    Andreas Remsperger, Jan 30, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    191
    Andreas Remsperger
    Jan 30, 2004
  4. Friso Wiskerke

    Having trouble with implementing a SOAP header

    Friso Wiskerke, Jan 24, 2006, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    182
  5. Peter van der veen

    How to add SOAP header to a SOAP message?

    Peter van der veen, Nov 8, 2006, in forum: ASP .Net Web Services
    Replies:
    6
    Views:
    581
    J. Dudgeon
    Nov 14, 2006
Loading...

Share This Page