[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2019
  • Last Modified:

MSXML2.ServerXMLHTTP authentication

I am trying a basic web services call. I tried this through SOAP UI and gave the login and password as request properties and it works. How can I simulate this excel macro?

I tried the following:

    xmlhttp.setRequestHeader "Man", Post & " " & "https://" & Server & " HTTP/1.1"
    xmlhttp.setRequestHeader "MessageType", "CALL"
    xmlhttp.setRequestHeader "Content-Type", "text/xml"
    xmlhttp.setRequestHeader "Username", UserName
    xmlhttp.setRequestHeader "Password", Password

It did not work. I also tried to append the username and password along with the server and still did not work.
0
PraKash
Asked:
PraKash
  • 3
  • 3
1 Solution
 
jkpieterseCommented:
Hi Prakash,
It looks like you haven't posted your entire code, could you do that please? Some essential parts are missing to make this work.
0
 
PraKashAuthor Commented:
well, I was going ask for the code to make a basic authentication. I can do this through SOAP UI. But I want to know how to replicate the SOAP UI authentication. I can send the data over but it comes back saying have to send session ID or login information.
0
 
jkpieterseCommented:
I still have to see your complete code including the line that generates the error. Maybe something important is missing. Also, have a look at this question:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_25609912.html
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
PraKashAuthor Commented:
Let me rephrase my question. How can I make SOAP calls to a web service that accepts basic authentication? I can make these calls through SOAP UI but when I try that from macros its giving me no SOAPAction Header! error.

I dont ahve the code yet. The ones that I pasted in front were the first few lines that I have
0
 
PraKashAuthor Commented:
I figured it out myself. Thanks.
0
 
jkpieterseCommented:
Would you like to share the solution so others may learn?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now