hi all

further on this issue since it's still outstanding:

the <checkPaymentComplexResult>0</checkPaymentComplexResult>
(from the soapScope tests - see below) proves that the soap request and
it's response are working PROVIDED we use something other than CF to
call the webservice.

if it IS malformed soap headers:
================================
 - then soapScope is more forgiving in generating something that the
target ASMX file will understand and CF isn't (there is a well founded
_questioning_ of Microsoft "standards" here)

if it IS the CF code/we're not calling it correctly: 
=====================================================
 - SteveB pointed out the use of "Return_Struct_Name" which we're not
providing to the method (do you really HAVE to? it seems that the method
called only takes the 3 values we're sending it).

<SNIP src="[EMAIL PROTECTED]">
ws.MethodCall("1", "2", "2004-05-31", 7, "Return_Struct_Name",
"errorMsg");

"MethodCall" is just the name of the method you're calling;
"Return_Struct_Name" is the name of the return struct as named in the
WSDL - NOT the returnvariable defined in CF.
</SNIP>

 - Mind you, changing the method call to
ans = ws.checkPaymentComplex(
        "payID", "invoice 123","checkPaymentComplexResult","errorMsg");

didn't improve anything.
 
if this wasn't going over https:// I'd put a packet sniffer on it to see
what is actually sent and received. Failing that, is there anyway within
CF to see the (unencrypted SSL) SOAP envelope for request and response
(like CFHTTP perhaps?)

any advice most welcome
cheers
barry.b


 - the results from the successful (well, no errors) soapScope request,
earlier today.

request:
===============================
<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:
=================================

<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>




-----Original Message-----
From: Steve Baty [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 1 June 2004 5:59 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: asmx web service - not resolved

Barry,

Lindsay and I ran into a similar problem on Friday, which was being (at
least partly) caused by the date format we were using. The WSDL was
specifying ddmmyy, but we continued to receive the stub error you're
reporting.

We eventually tried 2004-05-31 instead, and it worked!?

The first part of your call is very similar to ours. Here's the second
line of our code, which passes in the arguments...

ws.MethodCall("1", "2", "2004-05-31", 7, "Return_Struct_Name",
"errorMsg");

"MethodCall" is just the name of the method you're calling;
"Return_Struct_Name" is the name of the return struct as named in the
WSDL - NOT the returnvariable defined in CF.

Not sure if that helps, but it might.

Steve
-----------------------------------
Steve Baty - senior analyst
p: 612 8596 4030
m: 0417 061 292
f: 612 8596 4001
e: steve @redsquare.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barry
Beattie
Sent: Tuesday, 1 June 2004 4:19 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: asmx web service - not resolved

Gareth (orig poster) and I are still having grief with this. The error
now is: 

"Could not generate stub objects for web service invocation."
(the full error is listed below)

we're starting to think it might not be correctly set CF soap headers.
Why? Using mindreef's soapscope (a cute little webserver esp built for
testing webservices), the webservice works and returns correct values
(in this case "0" - non account) and does not error. so it's not network
or protocol issues (and specifically the webservice running under https
isn't the cause - even though the error alludes to this).

Added to this is that we can call other external webservices via CF fine
(although I haven't found another ASP.NET/asmx services that needs
request headers to try - anyone suggest one for testing?). 

I found this just before that might be related (from a Feb 2004 post)
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
7&threadid=781179

<quote>
        The problem is that it seems our ability to set soap headers
(using addRequestHeader() - bb) is limited.
</quote>

although we're really NOT keen to go down the Java route to get this
going.

any thoughts?

cheers
barry.b

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
========
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");




---
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

Reply via email to