Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6093941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:37:11+00:00 2026-05-23T12:37:11+00:00

Had a headace trying to get this to work, im trying to set up

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:37:11+00:00Added an answer on May 23, 2026 at 12:37 pm

    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

    Public Class PriorityHeader
        Inherits SoapHeader
        Public Priority As PriorityLevels
        Public Enum PriorityLevels
            LowPriority
            MediumPriority
            HighPriority
        End Enum
    End Class 
    

    Then markup you web method like this :

    <WebMethod(), SoapHeader("PriorityLevel", Direction:=SoapHeaderDirection.InOut,   Required:=False),SoapDocumentMethod()>
    Public Function YourMethod(ByVal quantity As Integer) As DateTime
    

    And after this you can access the SOAP Header like this :

     If PriorityLevel Is Nothing Then
            PriorityLevel = New PriorityHeader()
            PriorityLevel.Priority = _
                PriorityHeader.PriorityLevels.MediumPriority
        End If
        Select Case PriorityLevel.Priority
        bla bla bla bla bla
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Had a coworker ask me this, and in my brain befuddled state I didn't
I had the idea of a search engine that would index web items like
I have had some thoughts recently on how to handle shared javascript and css
had been years since I wrote my last line in C, now I'm trying
had a bit of confusion going around in work earlier. Thought id run it
We had a Windows Service Project hosting two of our WCF services and we
looking for some feedback on the built in membership and roles management for ASP.Net
Had a Windows Forms app using a WebBrowser control (.NET 4) to load a
Had a quick google to see if this can be done without much luck,
had a look for a guide on this but couldn't really find anything specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.