ColdFusion and ASP.NET Web Service Interoperability, Part III

Yesterday I described some of the problems I was having getting ColdFusion to talk to an ASP.NET web service as well as a brute force solution to the issue. Well my former co-worker Phil Duba left a comment on that post pointing to the follwing article: Notes on Interfacing ColdFusion MX to External Web Services Requiring Complex-within-Complex XML Documents as Input. This article turned out to be the key to my getting this web service call to work using <cfinvoke>.


Critical5's Gravatar Hi, I like this article, simply because i think i may be having the same problem. I am trying to consume a third party web service(.NET) and keeps getting the same message! I am getting my manager to add this WSDL2Java tool to have a go at it.
One question: does that mean you do not need to add a proxy class??

# Posted By Critical5 | 7/19/07 12:19 PM
Nathan Mische's Gravatar ColdFusion still needs to create the webservice stub, which it does automatically when you use cfinvoke, cfobject, or createObject(). The WSDL2Java tool just shows you the Java source code used to create that stub. For a little more info check out the related post "WSDL2Java Batch File."
# Posted By Nathan Mische | 7/19/07 1:06 PM
Critical5's Gravatar Hi Nathan,
Since the <cfinvoke needs a wsdl file url i have hosted this on my server but when i try to see it in a browser I get a blank page.(I have my wsdl file on CD from the vendor)!!

Any ideas?
# Posted By Critical5 | 7/20/07 5:23 AM
Nathan Mische's Gravatar Trying to use cfinvoke against a static WSDL will not work, there is nothing implementing the webservice. You _may_ be able to run the WSDL2Java utility against it, but I haven't tried that. I would suggest getting the actual web service URL from the vendor. If they give you a .aspx URL just append ?wsdl to get the WSDL.
# Posted By Nathan Mische | 7/20/07 8:57 AM
Critical5's Gravatar The thing is the url they gave to me displays absolutely nothing or displays an uknown soap error.Now in my wsdl file i have this:[   <service name="name">
      <port name="soap_port" binding="nsp:binding">
         <soap:address location=";
which made me believe that will have to be run through the wsdl file. Probably influenced by a >NET version i did of this webservice althought .NET makes it easier to create stubs!!

Not sure what to try next!!
# Posted By Critical5 | 7/20/07 10:45 AM
Critical5's Gravatar Sorry for the double entry...When i do <cfhttp> over it and <cfdump>it i get an incompatible browser message!!
Any ideas?
# Posted By Critical5 | 7/20/07 10:46 AM
Phillip Gomer's Gravatar Great post!

Any luck getting a parameter with javax.xml.rpc.holders.BigDecimalHolder to work?
# Posted By Phillip Gomer | 8/6/07 6:07 PM
Nathan Mische's Gravatar @ Phillip - I haven't tried a BigDecimalHolder parameter. Did you try setting up similar to the company_AddResult variable in the last code example above?
# Posted By Nathan Mische | 8/6/07 6:17 PM
Fuseflash's Gravatar Thanks so much!! ;-) Works like a charm.
# Posted By Fuseflash | 6/7/08 6:31 AM
Robs67's Gravatar I know this is three years old, but this post saved me. I pulled my hair out for three days and, after trying this, it freaking worked!

Thanks so much!
# Posted By Robs67 | 4/21/10 12:29 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.