You're welcome, I'm glad that helped. As far as authentication goes,
it looks like this needs to be submitted as a SOAP header. I'm not too
familiar with that aspect of web services, but here is my stab at it:

<cfscript>
   wsurl = "https://www.blackbookws.com/UsedCarWS.asmx?WSDL";;
   portname = "UsedCarWS";
   ws = CreateObject("webservice", wsurl, portname);

   authHeader = xmlNew();
   authHeader.UserCredentials = xmlElemNew(authHeader,
"http://localhost/webservices/UsedCarWS";, "UserCredentials");

   authHeader.UserCredentials.userid = xmlElemNew(authHeader, "userid");
   authHeader.UserCredentials.userid.xmlText = "userid"; //plug in
your userid value here

   authHeader.UserCredentials.password = xmlElemNew(authHeader, "password");
   authHeader.UserCredentials.password.xmlText = "password"; //plug in
your password value here

   authHeader.UserCredentials.company = xmlElemNew(authHeader, "company");
   authHeader.UserCredentials.company.xmlText = "company"; //plug in
your company value here

   authHeader.UserCredentials.producttype = xmlElemNew(authHeader,
"producttype");
   authHeader.UserCredentials.producttype.xmlText = "producttype";
//plug in your producttype value here

   authHeader.UserCredentials.returncode = xmlElemNew(authHeader, "returncode");
   authHeader.UserCredentials.returncode.xmlText = "0"; //this needs
to be an integer

   authHeader.UserCredentials.returnmessage = xmlElemNew(authHeader,
"returnmessage");
   authHeader.UserCredentials.returnmessage.xmlText = "returnmessage";
//can this be an empty string?

   addSOAPRequestHeader(ws, "ignored", "ignored", authHeader);
   body = structNew();

   response = ws.getAllStates(body);
</cfscript>

<cfdump var="#response#">

I'm creating the header as an XML document (there may be a less
verbose way of dealing with this -- if so, I'd love to hear it), and
using the namespace indicated in the examples listed here:

https://www.blackbookws.com/UsedCarWS.asmx?op=AllStates

You will need to plug in the correct values for userid, password,
etc., of course. I cannot tell if this works, as I obviously do not
have the authentication credentials, but it does not thrown an error,
and returns what appears to be a valid response (without any data).

I'd be curious to hear if this actually works or not...

--
Ezra Parker

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:318478
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