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

Web Service - Call with URL and return SOAP?

New Here ,
May 01, 2009 May 01, 2009

Copy link to clipboard

Copied

Hello,

Is there a way to call a Coldfusion web service with a URL like http://site/component.cfc?method=dosomething&parm=1, and send the response back as SOAP? Seems I receive a wddx response when I do it this way. I know I can create a web service object and invoke it from Coldfusion, which is really nice since we can use the SOAP response just like a query object. Is there a way to do this "invoking" just from a http call?

Thanks!

TOPICS
Advanced techniques

Views

1.3K

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

correct answers 1 Correct answer

Advocate , May 01, 2009 May 01, 2009

I've used that approach to interact with CFCs from an Ajax call on the client, returning JSON or XML from the CFC but do not think that this approach would be ideal for returning a SOAP response.

Technically, you could use that approach to return a SOAP response, however, it means your CFC method would need to generate and return the SOAP XML itself. CF won't automatically do this for you as it does when you call a CFC as a Web Service.

You can call a web service from CFHTTP but I think it's much

...

Votes

Translate

Translate
Advocate ,
May 01, 2009 May 01, 2009

Copy link to clipboard

Copied

I've used that approach to interact with CFCs from an Ajax call on the client, returning JSON or XML from the CFC but do not think that this approach would be ideal for returning a SOAP response.

Technically, you could use that approach to return a SOAP response, however, it means your CFC method would need to generate and return the SOAP XML itself. CF won't automatically do this for you as it does when you call a CFC as a Web Service.

You can call a web service from CFHTTP but I think it's much more work than using CFINVOKE. There's a nice blog post on this approach:

http://www.jamesnetherton.com/blog/2007/01/14/Invoking-a-webservice-using-CFHTTP/

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
New Here ,
May 04, 2009 May 04, 2009

Copy link to clipboard

Copied

LATEST

Wow, thanks for the help! That was exactly what I needed. Very helpful.

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