• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Consuming WCF service with ColdFusion

New Here ,
May 30, 2010 May 30, 2010

Copy link to clipboard

Copied

Hello,

We've been trying to consume a web service (.svc file) created in WCF (.NET 4.0) in ColdFusion for a few weeks now. It seems every time we get one problem worked out, another one pops up. One of our biggest problems is how to see what's in the DTO that .NET is sending to ColdFusion. It was working in .NET 3.5, but then they upgraded the server to .NET 4.0. Now one of the variables keeps causing an error. I'm guessing it's a variable type that CF doesn't support without doing something to convert it.

My question is, what's the best way to go about getting this coded? Are there good resources somewhere? We've been Googling, so we've seen many of the articles that come up that way. Is ColdFusion Builder better suited to this than Dreamweaver? Eclipse? Any guidance would be appreciated.

Thanks.

TOPICS
Advanced techniques

Views

3.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2012 Feb 26, 2012

Copy link to clipboard

Copied

Did you get an answer to this? I'd also like to know. I'm struggling to find good resources. I'll have to blog about it myself when I understand it all.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 01, 2012 Mar 01, 2012

Copy link to clipboard

Copied

If your web services support SOAP, you can use a visual tool like CrossCheck Network's SOAPSonar - it will allow you to browse the service, generate sample request/response messages to expose the DTO structure.  Since it exposes the raw SOAP message exchange, you can also see if your trouble is caused by things that are hard to troubleshoot through CF - like XML namespaces.

CrossCheck Networks makes a personal version that is free for developers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2012 Mar 02, 2012

Copy link to clipboard

Copied

lrobey wrote:

Hello,

We've been trying to consume a web service (.svc file) created in WCF (.NET 4.0) in ColdFusion for a few weeks now. It seems every time we get one problem worked out, another one pops up. One of our biggest problems is how to see what's in the DTO that .NET is sending to ColdFusion. It was working in .NET 3.5, but then they upgraded the server to .NET 4.0. Now one of the variables keeps causing an error. I'm guessing it's a variable type that CF doesn't support without doing something to convert it.

My question is, what's the best way to go about getting this coded? Are there good resources somewhere? We've been Googling, so we've seen many of the articles that come up that way. Is ColdFusion Builder better suited to this than Dreamweaver? Eclipse? Any guidance would be appreciated.

As far as producing or consuming web services is concerned, the choice of platform(.NET 4.0, .NET 3.5, ColdFusion) or of IDE(Dreamweaver, Eclipse, CF Builder) should not matter. After all, one of the main promises of web services is interoperability between different systems.

Since the latest errors occurred after the upgrade to .NET 4.0, the fault is very likely with the service provider (.NET), and not with the service requester(ColdFusion). Make sure provider and requester communicate by means of an established protocol, like SOAP.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 02, 2012 Mar 02, 2012

Copy link to clipboard

Copied

Since the latest errors occurred after the upgrade to .NET 4.0, the fault is very likely with the service provider (.NET), and not with the service requester(ColdFusion). Make sure provider and requester communicate by means of an established protocol, like SOAP.

This, while technically correct, may be a little misleading.  Odds are there is some advanced (though standardized) web service behavior introduced by .NET 4 (most likely complex handling of XML namespaces) that ColdFusion's notoriously outdated implementation of web services (Java AXIS) has problems with.  Thankfully, in CF10 we have an update to that system, but in the meantime it may be easier to revert to passing raw XML SOAP messages (if your web service is SOAP based) as described in this article by Ben Nadel:

http://www.bennadel.com/blog/1809-Making-SOAP-Web-Service-Requests-With-ColdFusion-And-CFHTTP.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2012 Mar 02, 2012

Copy link to clipboard

Copied

LATEST

insuractive wrote:

Since the latest errors occurred after the upgrade to .NET 4.0, the fault is very likely with the service provider (.NET), and not with the service requester(ColdFusion). Make sure provider and requester communicate by means of an established protocol, like SOAP.

This, while technically correct, may be a little misleading.  Odds are there is some advanced (though standardized) web service behavior introduced by .NET 4 (most likely complex handling of XML namespaces) that ColdFusion's notoriously outdated implementation of web services (Java AXIS) has problems with.  Thankfully, in CF10 we have an update to that system, but in the meantime it may be easier to revert to passing raw XML SOAP messages (if your web service is SOAP based) as described in this article by Ben Nadel:

http://www.bennadel.com/blog/1809-Making-SOAP-Web-Service-Requests-Wit h-ColdFusion-And-CFHTTP.htm

You misunderstand what I said. When I say "the fault is with the provider", I mean "the provider is the one whose fault it is that the hitherto working service fails". So I am not necessarily saying there is an error on the side of the provider, though that is possible.

The key point is the etiquette between server(providing a service) and client(consuming it). The server has the obligation to inform all clients of changes to his service. Especially the kind of changes you mention.

Take the web, for example. If your website onesidedly assumes that visitors have the latest versions of the latest browsers, then it will end up frustrating a lot of people.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation