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");
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
--
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]