On Thu, May 7, 2009 at 5:29 PM, denstar <valliants...@gmail.com> wrote:

>
> Hi!
>
> I'm trying to use a webservice that uses http-based authentication.
>
> Using cfinvoke works fine, but I need createObject, as the returned
> documents are in the request as attachments.
>
> If I define the WS in the CF admin area, createObject works fine, but
> I don't want to have to access the admin to do what I want to do.
>
>
> I know CF-WS-consumption-land is a land of fun,
> undocumented-yet-super-useful functions, so I'm thinking there's a
> possibility... even if it's something dumb and not nifty, like using
> cfhttp first and passing that session along or something.
>
> Just plain curious, as I'm liking what I ended up with, so original
> problem solved... but still.
>
> Is there a more obvious way I overlooked?
>
> -d
>


So instead of using CFHTTP username and password send it as a header
instead.

I know that on blue dragon Net servers I need to do basic http auth like
this.

<CFSET strCredential="Basic " &
ToBase64("#request.UserName#:#request.Password#")>

<CFHTTP method="post" url="#getEquidataURL()#" port="443" timeout="60"
throwonerror="yes">
 <CFHTTPPARAM type="header" name="Authorization" value="#strCredential#">
<CFHTTPPARAM type="body" value="#request.xmlData#">
</CFHTTP>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322326
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to