Consuming ColdFusion Web Service

G

GaryDean

I've been writing Web services and assemblies that consume web services
successfully for some time now. However, I need to consume a web service
from a vendor that was written in Cold Fusion and it's not working...

The Web Service reference gets created ok. It's name is CMWebService. The
problem I have is after building the reference there is no name space for
CMWebService so I can't instantiate the service.

Does anyone know why this would occur for this Cold Fusion Web service or a
way to get around the issue?
 
D

Damon Allison

Gary,

Are you using VB.NET? If so, what is the "default namespace" of the
project in vs.net? (right click project -> properties). vb projects
append this namespace to all class files in the project, so try creating
your proxy class with the namespace attached.

If that does not work, you can compile the proxy as a library, reference
the library. Perhaps you can work backwards from there.


HTH,
Damon
 
G

GaryDean

It's C# and it does not exist within the project namespace. It doesn't
exist at all.
 
D

Damon Allison

It's C# and it does not exist within the project namespace. It doesn't
exist at all.


Under the covers, vs.net's "add web reference" uses wsdl.exe. You could
run wsdl.exe against your web service to gen a proxy and include the
resulting .cs file in your project rather than using "add web ref" - at
least to get *something* working.

If you want to keep using the "add web reference", located the
"Reference.cs" file that is generated and find the namespace used.

HTH,
Damon
 
G

GaryDean

I found an example at the code project on doing exactly that. I get...

Error: unable to import binding 'login.cfcSoapBinding' from namespace from
'http://web_service.dealers'

I'm suspecting that their wsdl is somehow malformed
 
S

Steven Cheng[MSFT]

Hi Gary,

As the wsdl.exe report the following error:

============
Error: unable to import binding 'login.cfcSoapBinding' from namespace from
'http://web_service.dealers'
=============

the ColdFusion service's WSDL document seems contains some incorrect
binding elements or the certain binding element is pointing to some other
invalid external link. Also, the "add webreference" apparently fail to
generate the proxy class.

Is it possible for us to access the service WSDL document over public url
or can you post a local copy of the WSDL document? We can perform some test
locally to see what's the exact problem in it.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cowboy \(Gregory A. Beamer\)

After reading through, it sounds like there is a bit of malformed (or
potentially not MS formed) WSDL. You will likely have to tweak the
definition yourself.

One idea is to grab the WSDL and run WSDL.exe and see if it is blowing up.
If not, find the particular error and look at how it seems to be expected
the particular element (in the MS generated proxy stub WSDL). Then, talk to
the CF guys and figure out their implementation. You can then edit the WSDL
on yoru end to match what they think they are expecting. That will likely
cure your issues, if it is merely the service.

One of the problems you mentioned sounded like you were not actually getting
the service set up correctly in your code (web reference incorrect?). Look
at the proxy class and "fix" your code to match the class definition, if
this is still an issue.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
 
G

GaryDean

Steven,
The cold fusion developers found it to be a bug and they got it fixed.
apparently is was malformed wsdl.
 
S

Steven Cheng[MSFT]

Thanks for your followup Gary,

Glad that the WSDL document will be corrected.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top