Perhaps I'm not being clear enough. I'm trying to use the callout feature in Apex code to call a webservice that uses Basic authentication. I've imported the wsdl and generated the Apex code successfully but when I try to use it WebServiceCallout.invoke seems to make the call ok but the response fails, naturally enough, since I haven't logged in to the external webservice. So is there any provision for logging in to an external webservice like this in Apex code when performing the call out?
Currently there is no way to add HTTP headers to the apex web service request. So you wont be able to set the authorization header on the outgoing request.
This looks like a good feature to have for callouts. Please add this to idea exchange.
Hope this helps.
- Rick Greenwald
Developer Evangelist
So you wont be able to set the authorization header on the outgoing request.
This looks like a good feature to have for callouts. Please add this to idea exchange.
Thanks,