By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,453 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,453 IT Pros & Developers. It's quick & easy.

Problem calling Webservice with Basic Authentication

P: n/a
Hi there
I am somewhat stuck with calling a WebService from out of a VB App.

My Goal:
- Get a WebService invoked under MS - Access 2002, not using the
MS-SOAP-Toolkit but the .net - Framework

My Restrictions:
- The WebService is pure Java, running under WebSphere5.1
- The Request requires Basic Authentication and needs to be SSL
What I achived:
- The ServerSide is running OK
- A Java-Client using ApacheSOAP is running OK
- My WSDL - File is OK
- I got a monitor set up that intercepts incoming requests and
forwards them to the actual server, calls from my VBA Code are OK
(correct SOAP-Requests)
Where I'm stuck:
- The HTTP-Post request has no Authentication-Information.
- In a second step I need the ssl cert, but I have not bothered about
that yet.
My approach so far:
---------------- SNIP -----------------
Const WS_URL = "BLA.wsdl" ' WSDL File stored lokally

Dim client As SOAPClient

Dim nResult As String
Set client = CreateObject("MSSOAP.SOAPClient")

Call client.mssoapinit(WS_URL)

client.ConnectorProperty("AuthUser") = "foo"
client.ConnectorProperty("AuthPassword") = "bar"
client.ConnectorProperty("UseSSL") = False

nResult = client.getNewIds("99999")
Debug.Print nResult
---------------- SNAP -----------------
This will end up in an "Not-Authenticated" error, as the Request is
somewhat like:
---------------- SNIP -----------------
POST /ONBSystem/services/ONBPort HTTP/1.1
SOAPAction: "urn:#orderGetNewOffer_Ids(duns)"
Content-Type: text/xml
User-Agent: SOAP Sdk
Host: localhost
Content-Length: 392
Connection: Keep-Alive
Cache-Control: no-cache

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
</SOAP-ENV:Envelope>---------------- SNAP -----------------
Which misses the "Authentication: Basic sdretwefasdfert=="
Could anyone please push me into the right direction? I could not find
any samplecode, which lets me assume I'm doing all wrong and got the
wrong approach?
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.