locked
How to use VBA and Web Service References add-in to create soap call with SOAP header authentication Options RRS feed

  • Question

  • I have been trying in vain to try to figure out how to use VBA and the
    WEB Service References add-in to to allow me to send a request to a
    web service that requires authentication information be presented in a
    SOAP header.  I had no trouble creating many functions, subroutines
    and custom classes to the web service via the Web Service References
    add-in.  That worked slick.  Seems to work but I am unable to specify
    the soap authentication header.  Found an email stating how to do this
    via a custom IHeaderHandler module but I never could get it to work.

    http://technical-domain.blogspot.com/2009/05/handling-iheaderhandler-...

    Also this text from the url below
    "The client code generated by the Office XP WS Toolkit does not
    support the DCTM authentication tokens sent in the header of the SOAP
    message. In order to make the client work, we have to override the
    default behavior for handling the SOAP header. This can be done by
    overriding the IHeaderHandler class used by the SoapClient30 object."

    See the VBA client section specifically step 4 in the link below:

    http://developer.emc.com/developer/Articles/wsf/Consumers_of_the_Web_...

    I couldn't make either of the above work.

    Would love to hear from anyone who has solved the problem of
    customizing the SOAP header for web service authentication.

    Bobalston    at   gmail    DOT     c o m

    • Moved by Max Wang_1983 Wednesday, April 27, 2011 7:31 PM forum consolidation (From:General Discussion)
    Friday, October 9, 2009 11:16 PM

All replies

  • Bob,

    Did you ever figure this out?  I am having the same problem.  I need to pass authentication information in the header of my web service calls, but I cannot figure out how to do it.  The web service toolkit worked great for generating the class for the ws based on the wsdl and I have used it for public web services without any problems.

    Thank you,

    Steve
    Monday, February 8, 2010 8:51 PM
  • Nope.  Never did.  Ended up creating a test file with the SOAP message which I read in, did string search/replace and sent.  that has been working well.

     

    I have been trying to get www.POcketSoap.com to work.  Looks very nice.  I just got it to work - at least to send and receive messages.  Now the issue is that my request is not valid; I get an error from the server.  But at least it is flowing both ways.

     

    I am also investigating using WSDL.exe to use the WSDL file to generate a SOAP proxy in VB and compile it with VBC.exe.  I can then create an instance and set the parameters.  The remaining problem I am having is finding the right syntax to set the soap headers.

     

    Good luck.

     

    Bob


    Bob Alston
    Wednesday, April 27, 2011 8:08 PM
  • I just finished getting PocketSoap to work.  Nice piece of FREE software.

     

    bob


    Bob Alston
    Friday, April 29, 2011 2:26 PM