Hi Ken. From the addSOAPRequestHeader doco... 

"If you pass XML in the value parameter, ColdFusion ignores the namespace
and name parameters. If you require a namespace, define it within the XML
itself."

So you'll need to do it like this (chuck your ID in there);

<cfxml variable="authHeader">
        <tns:AuthenticationHeader xmlns:tns="http://skats.net/services/";>
                <SessionID>12345</SessionID>
        </tns:AuthenticationHeader>
</cfxml>

<cfscript>      
vinService =
CreateObject("webservice","http://www.codebump.com/services/zipcodelookup.as
mx?wsdl");

addSOAPRequestHeader(vinService,"http://this.is/ignored/","IgnoredName";,
authHeader, true);              
        
returnStruct = vinService.GetDistanceBetweenZipCodes(zip1 = "91709",zip2 =
"90034");       
</cfscript>

When running it you'll see "Subscription ID is empty" in the soap fault only
if you do not add the soap header or include the <SessionID> element.

I hope this helps... when you get your CF7 server hehehe.

Cheers.

-----Original Message-----
From: Ken [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 December 2005 6:16 AM
To: CF-Talk
Subject: Re: CFXML issue

Hi Ade. Actually no. I am trying to create this to pass it as a header for a
soap request. My complete code looks like this:

<cfprocessingdirective suppresswhitespace="Yes">
<cfcontent type="text/xml; charset=utf-16">
<cfxml variable="creds">
<tns:AuthenticationHeader id="h_id1">
<SessionID xsi:type="xsd:string">XXXXX</SessionID>
</tns:AuthenticationHeader>
</cfxml>
</cfprocessingdirective>
<cfscript>
vinService = CreateObject("webservice", "
http://www.codebump.com/services/zipcodelookup.asmx?wsdl";);
addSOAPRequestHeader(vinService,"http://skats.net/services/";,
"AuthenticationHeader", creds, FALSE);
returnStruct = vinService.GetDistanceBetweenZipCodes(zip1 = "91709",zip2 =
"90034");
</cfscript>

<cfdump var="#returnStruct#">




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225922
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to