thanx for your interest Simon
how do you add request headers to the SOAP call with CFINVOKE? this services uses 2 - authID and password. couldn't find any examples (and assumed the only way was to use createobject() )
cheers
barry.b
----- Original Message -----
From: Simon Horwith <[EMAIL PROTECTED]>
Date: Wed, 02 Jun 2004 06:25:08 +0100
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] anyone called a webservice with addRequestHeader()sucessfully?
not that it will necessarily makes a difference, but did you try using <CFINVOKE>? While I prefer CFSCRIPT, sometimes there are things that are easier to do with the tag syntax.
~Simon
Simon Horwith CTO, eTRILOGY ltd. Member of Team Macromedia Macromedia Certified Master Instructor http://www.cfstandards.org
Barry L Beattie wrote:
Hi all
We're trying to connect our CF app to an ASP.NET (asmx) webservice.
Has anyone called a webservice with addRequestHeader(), sucessfully? It can't be a network problem (it works with other tools) so it's either (1) sheer incompetance on my part or (2) something funny with CF calling other webservices.
- all our CF servers have had the webservice headers hot-fix applied.
I've stumped our local list (CFAussie) - aparently not many webservices are used in Australia (or they work without grief so (1) above applies here)
<cfscript>
ws = CreateObject("webservice",
"https://www.stratapay.com.au/ecommservices.asmx?WSDL");
addRequestHeader(ws, "authID", "test");
addRequestHeader(ws, "password", "test");
addRequestHeader(ws, "timeStamp", "#now()#");
ans = ws.checkPaymentComplex("test", "test 123");
</cfscript>
<cfoutput>#ans#</cfoutput>
<cfdump var="#ws#">
no go. "Could not generate stub objects for web service invocation"
HOWEVER, we can using a tool called soapScope and it all works fine - correct response headers, sensible answer, etc.
We can CFDUMP the webservice object (before the method call) and it all looks good. Start adding header info and it craps out.
I just hope it doesn't go down this path. I really don't want to re-do this in Java
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=7&threadid=781179
any thoughts greatfully recieved
thanx
barry beattie
request (using soapScope):
===============================
<soap:Envelope
xmlns:s0="http://tempuri.org/stratapayMKII/eCommServices"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<s0:StrataPayAuthenticator>
<s0:authID>test</s0:authID>
<s0:password>test</s0:password>
<s0:timeStamp>2003-11-12</s0:timeStamp>
</s0:StrataPayAuthenticator>
</soap:Header>
<soap:Body>
<s0:checkPaymentComplex>
<s0:payID>test</s0:payID>
<s0:invoiceNumber>test</s0:invoiceNumber>
</s0:checkPaymentComplex>
</soap:Body>
</soap:Envelope>
response (using soapScope):
=================================
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<StrataPayAuthenticator
xmlns="http://tempuri.org/stratapayMKII/eCommServices">
<authID>test</authID>
<password>test</password>
<timeStamp />
</StrataPayAuthenticator>
</soap:Header>
<soap:Body>
<checkPaymentComplexResponse
xmlns="http://tempuri.org/stratapayMKII/eCommServices">
<checkPaymentComplexResult>0</checkPaymentComplexResult>
</checkPaymentComplexResponse>
</soap:Body>
</soap:Envelope>
CODE:
=======
<cfscript>
ws = CreateObject("webservice",
"https://www.stratapay.com.au/ecommservices.asmx?WSDL");
addRequestHeader(ws, "authID", "test");
addRequestHeader(ws, "password", "test");
addRequestHeader(ws, "timeStamp", "#now()#");
ans = ws.checkPaymentComplex("test", "test 123");
</cfscript>
<cfoutput>#ans#</cfoutput>
<cfdump var="#ws#">
ERROR (using CF code above)
========
Could not generate stub objects for web service invocation.
Name: https://www.stratapay.com.au/ecommservices.asmx?WSDL.
WSDL: https://www.stratapay.com.au/ecommservices.asmx?WSDL.
java.net.MalformedURLException: unknown protocol: https
It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness. If the requested WSDL document can't be retrieved or it is dynamically generated, it is likely that the target web service has programming errors.
The Error Occurred in C:\CFusionMX\wwwroot\webservice\testwscall.cfm:
line 15
13 :
14 : <cfscript>
15 : ws = CreateObject("webservice",
"https://www.stratapay.com.au/ecommservices.asmx?WSDL");
16 : addRequestHeader(ws, "authID", "test");
17 : addRequestHeader(ws, "password", "test");
-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED] --
__________________________________________________________
Sign-up for Ads Free at Mail.com
http://www.mail.com/?sr=signup
