thankyou Sean for taking the effort to put this straight.


authHeader = 
createObject("java","org.apache.axis.message.SOAPHeaderElement")
        .init("http://tempuri.org/stratapayMKII/eCommServices";, 
"StrataPayAuthenticator");

authHeader.addChildElement("authID").addTextNode("test");
...etc

this is new to me. now I have a better understanding on how the headers
should be called - not as straightforward as I first thought. More
research to do, methinks

thanx again
barry.b






-----Original Message-----
From: Sean A Corfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, 4 June 2004 9:27 AM
To: CFAussie Mailing List
Subject: [cfaussie] webservices and https

I posted this to CFCDev in response to Barry's question... figured I 
should post it here as well...

I've also been able to successfully call salesforce.com web services - 
see my recent blog entry...

Begin forwarded message:

On Jun 3, 2004, at 7:01 AM, Barry L Beattie wrote:
> <quote>The problem is that it seems our ability to set soap
> headers is limited.</quote>

Here's some code that correctly calls the stratapay WS (and gets the 
expected result of 0 back):

<cfscript>
// create the web service object:
ws = createObject("webservice", 
"https://www.stratapay.com.au/ecommservices.asmx?WSDL";);

// create the SOAP Header Element called StrataPayAuthenticator:
authHeader = 
createObject("java","org.apache.axis.message.SOAPHeaderElement")
        .init("http://tempuri.org/stratapayMKII/eCommServices";, 
"StrataPayAuthenticator");

// add the three child elements:        
authHeader.addChildElement("authID").addTextNode("test");
authHeader.addChildElement("password").addTextNode("test");
authHeader.addChildElement("timeStamp").addTextNode("2003-11-12");

// set the header:

ws.setHeader(authHeader);

// call the method:
ans = ws.checkPaymentComplex("test", "test 123");
</cfscript>     

<cfoutput>#ans#</cfoutput>

Sean A Corfield -- http://www.corfield.org/blog/

"There are no solutions, only trade-offs."
-- Thomas Sowell


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to