SOAP Extension Attribute with overloaded constructor

J

john conwell

I'm creating a custom soap extension and i've got my two classes that inherit from SoapExtension and SoapExtensionAttribute respectivly. I've wrtitten my custom attribute to have an overloaded constructor to take a filename string. The problem is that i cant figure out how to access the custom attribute in my custom SoapExtension class in order to get the filename. The SoapMessage object that is passed into ProcessMessage has a private 'allExtensions' collection that holds an instance to my soap extension. I could use reflection to call this private property to get the instance of my attribute class, but that wouldnt be very fast. Is there something i'm missing here? Is there no way to access public properties of your custom SoapExtensionAttribute classes?

thanks,
John
 
J

John Conwell

Ok, so maybe i should have kept reading the documentation. the very next paragraph told me how to do this.

So for those who dont know, the SoapExtension class also makes you override the GetInitializer(,) function, which passes in the custom attribute instance as the second parm. you can then just call the public property of your custom attribute class. easy as cake!
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top