• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Visual Basic Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
Visual Basic Developer Center > Visual Basic Forums > Visual Basic General > SOAP Client Header : Help!
Ask a questionAsk a question
Search Forums:
  • Search Visual Basic General Forum Search Visual Basic General Forum
  • Search All Visual Basic Forums Search All Visual Basic Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerSOAP Client Header : Help!

  • Sunday, October 14, 2007 11:20 AMJoffies Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    Good Day!

     

    Any help will be greatly appreciated.

     

    I am consuming a webservice and I am struggling to get around constructing/setting up the client side soap header.

    The webservice does not have the soap headers defined on any of the webmetods so i am guessing I will have to construct the soap header on the client side on the fly?

     

    I have searched hi and lo for any samples on doing this but cant seem to get any samples on doing so.

     

    Help!!

     

    Thanks

    • ReplyReply
    • QuoteQuote
     

Answers

  • Tuesday, October 16, 2007 7:14 AMBruno YuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0

    Joffies,

     

    According to your question on creating client side soap header, I would like to provide you the example as follows:

     

    SOAP Headers can play an important role in SOAP messages.  By using headers, you can separate data that is used by the Web Service but not directly related to the functionality exposed by a given Web Method.  Unlike the Body element of a SOAP message, which includes the in and out parameters for the XML Web service method, which are thus processed by the XML Web service method, the Header element is optional and can be processed by the infrastructure.  In other words, it is processed by an infrastructure developed to provide a custom authentication mechanism.

     

    The following sample demonstrates how to achieve Custom Authentication using Soap Headers in XML Web Services.

     

    Soap Headers Authentication in Web Services

    We have seen in this article how useful Soap Header authentication is for both secure and non-secure Internet scenarios.  User credentials are passed within the SOAP header of the SOAP message. The Web server, regardless of the platform hosting the XML Web service, provides a custom authentication implementation.

     

    Also, we have seen that on the consumer/client-side, very little code is required to add a SOAP header into a request.  A proxy object does the majority of the work required in adding header details into SOAP messages.

    The following example from code project can help you to create a SoapExtension that allows you to insert XML into a SOAP header.

     

    SOAP Header Extensions How-To

     

    You can also post the related question in .NET Remoting and Runtime Serialization and ASMX Web Services and XML Serialization forums for the further support.

    Hope that can help you.
    • ReplyReply
    • QuoteQuote
     

All Replies

    Need Help with Forums? (FAQ)
     
    © 2009 Microsoft Corporation. All rights reserved.
    Terms of Use
    |
    Trademarks
    |
    Privacy Statement