Adding a header to a WebService proxy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mcquiggd@hotmail.com

    Adding a header to a WebService proxy

    Hi,


    I have a proxy object to a webservice which exposes a Header
    collection.. I have also created a class that inherits from SoapHeader
    and has a single property; this class is then added to the Header
    collection on the property and is included in the serialised Xml which
    is sent to the webservice...

    However! Schema validation on the server fails as the Xml tree
    including the header is as follows:


    <soap:Envelop e>
    <soap:Header>
    <NameOfMyClas s>
    <Property>
    </NameOfMyClass>
    <soap:Header>
    <soap:Envelop e>


    I cannot change the schema, so I have created a function called by the
    ProcessMessage event within a client side Soap Extension which creates
    an element that equates to <soap:Header> , which is fine.


    This is, I feel, slightly messy. Ideally I would be able to attribute
    my custom class so that it was added as <soap:Header> rather than as a
    sub element ... anybody have an idea if this is achievable?


    Thanks,


    David

Working...