Had a headace trying to get this to work,
im trying to set up my ASP.NET web service to handle a custom header sent from iPhone.
Literally, sounds simple, all I am trying to do is retrieve a string value from a header that is sent from the iPhone to the web service.
So far, the iPhone has no issues sending “test” as a value to the following header “testHeader”
in pseudo, how is it possible to
string s = mywebservice.soapHeader.title = "testHeader"
any ideas please.
I have defined my class definition for the soap header which has a string attribute, but im having no luck trying to get that string attribute the value of this custom header!
cheers in advance
Take a look a this :
Digging into SOAP Headers with the .NET Framework
you should have a class in the web service that inherits SoapHeader
Then markup you web method like this :
And after this you can access the SOAP Header like this :