On Jun 3, 2004, at 12:07 AM, Barry Beattie wrote:
Sean, this is specifically dealing with a post from yesterday (and the
day before).

Ah, I was away in Albuquerque for a long weekend and really only skimmed a lot of posts before deleting them (I came home to 950 emails).


http://www.macromedia.com/support/jrun/ts/documents/tn17929.htm

That seems to apply to JRun 3.x, not JRun 4.x - and is related to the earlier version of the JVM that 3.x would have used. This problem should not be present for later JVMs, AFAIK.


the code is wrong...

'wrong' is probably too strong a word... incomplete, possibly. There's definitely some subtleties around consuming 'general' web services, particularly those that use security models.


CF doesn't like .NET webservices

CF can definitely consume .NET web services (I already had this discussion with the CF product team because we're just about to embark on a *large* CF / .NET web service project!).


the WS is broken but only for CFMX

Unlikely.

CF server config won't let it happen.

Also unlikely, IMO.

1) if your code works on a .NET webservice, what's the diff between your
working code and ours?

I don't know. Let's see a particular WS URL and your code and I'll see if I can call the same WS.


2) what else could be wrong, considering the webservice works using
things other than CF?

Headers can be one issue. Complex data types can be another. Both of these can be worked around - sometimes it's harder than it ought to be.


mind you, I've not seen ws.setHeader(namespace,element,value) before -
we've been using addRequestHeader() as per the MM article you suggested.

I believe they resolve to the same thing. I hit the WS object directly because I needed to manipulate the endpoint after the initial call (some web services pass back a server URL to be used for subsequent calls).


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>

According to this, you should be adding one header StrataPayAuthenticator and it should be a serializable Java bean containing three fields (authID, password, timeStamp). That is hard to create in pure CF in my experience (I'm working on it).


This code is closer to what you need (but still doesn't work):

<cfscript>
ns = "http://tempuri.org/stratapayMKII/eCommServices";;
  ws = CreateObject("webservice",
"https://www.stratapay.com.au/ecommservices.asmx?WSDL";);

authStruct = structNew();
authStruct["authID"] = "test";
authStruct["password"] = "test";
authStruct["timeStamp"] = "2003-11-12";
ws.setHeader(ns,"StrataPayAuthenticator",authStruct);
  ans = ws.checkPaymentComplex("test", "test 123");
</cfscript>       
          <cfoutput>#ans#</cfoutput>
           <cfdump var="#ws#">

The trick is to replace 'authStruct' with a serializable Java bean (I think).

ERROR (using CF code above)
the error has changed between this (below) and
"java.net.UnknownHostException"
========
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

What JVM are you using? I'm having no problem connecting to stratapay with https. Check your Settings Summary in CF Admin.


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

Got Mach II? -- http://www.mach-ii.com/


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