This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding Basic Authetication to SOAP Message  RSS feed

Dave Ehrlich
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to add a userid and password to my HTTP header when I am using SOAPto call a web service.
I am sending my SOAP message (web service) using message.send(). This doesn't accept any arguments for user id and password. However, the send() method instantiates a SOAPHTTPConnection object which does have a setUserName() and setPassword() method. These end up in the HTTP Header collection. However, when message.send calls the SOAPHTTPConnection.send() method it sets the Headers parameter to null.
So I do I get the username and password in the SOAP message for Basic Authentication? I don't think that creating a SOAPHTTPConnection object in my code would work since message.send() creates a new one.
Any help would be appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!