Excel - need to create header that maps to my C# SoapHeaderAttribu



Using Office 2003 Web Services Toolkit for VBA. I've successfully implemented
an IHeaderHandler in VBA that passes custom info in the Soap header to my C#
web service method. When looking at the Soap envelope xml on the server side,
I can see my soap header - getting everything I expect - great. The problem
is that my web service method is attributed with a SoapHeader devoted to
receiving authentication info from the header (username, pwd). The problem is
that the VBA call doesn't properly instantiate the object pointed to by the
attribute. I end up getting two UnknownSoapHeader objects in the resulting
SoapMessage on the server side, rather than one AuthInfoSoapHeader (my
derived class) instantiated with the contents of the header. I know from
looking at C# proxy code generated from VS.NET that the client side also uses
SoapHeaderAttribute. I obviously can't use attributes in VBA, so perhaps
somebody can suggest how I might solve this. Again, I'm getting a perfect
looking header from Excel to the server, but I just can't get it to
'magically' instantiate my custom SoapHeader object. Can parse XML if
required etc., but am looking to handle it in the same clean way that C#
clients do for example. Thanks.


Jan 14, 2012
Reaction score
Ever get the problem figured out? If so would you care to share your code?


bobalston9 AT yahoo D O T c o m

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