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

Moving from CF9 to CF11, webservices and POST bodies

New Here ,
Mar 06, 2017 Mar 06, 2017

Copy link to clipboard

Copied

Most CF coders are familiar with passing parameters to web services via the URL such as:

http://mydomain.com/service.cfc?method=login&username=test&password=pw1

Concerned about security of using a GET request and unknown to me, one of our third party implementrs managed to get our service working by making a POST to the url:

http://mydomain.com/service.cfc?wsdl

With the header:

Content-Type: application/x-www-form-urlencoded

and inside the POST body this:

method=login&username=test&password=pw1

To my surprise, the above actually worked fine in CF9.  We are now upgrading to CF11 and the vendor tells us that their code is all failing in our integration environment.  I tested it and it in fact doesn't work anymore in CF11 via that type of post.  I tried using both axis 1 and 2.

What can I do to make CF11 act the same as CF9 with this way of passing parameters?

Views

175

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 07, 2017 Mar 07, 2017

Copy link to clipboard

Copied

LATEST

The URL points to the WSDL, so it's a webservice. As such, the caller should use the proper syntax. In ColdFusion the calling code is something like:

<cfset wsObject = createObject("webservice", "http://mydomain.com/service.cfc?wsdl")>

<cfset returnValue = wsObject.login("test","pw1")>

Recall: http://mydomain.com/service.cfc?method=login&username=test&password=pw1 should work for CF9 as well as CF11, but it is not a webservice call.

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