Adding a header to a WebService proxy

M

mcquiggd

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:Envelope>
<soap:Header>
<NameOfMyClass>
<Property>
</NameOfMyClass>
<soap:Header>
<soap:Envelope>

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top