tracker issue : CF-4207558

select a category, or use search below
(searches all categories and all time range)
Title:

cfinvoke fails when calling service with returnType of “any”

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Duarte L. / ()

Created: 03/11/2020

Components: Web Services, Axis 2

Versions: 2018

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 2018.0.03.314033 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Linux RHEL 6.4

Vote Count: 0

Dear Sirs,

We are working on upgrading our ColdFusion servers, testing the applications migrated from our current CF10 servers to CF2018. We have an issue with cfinvoke calling webservices made available by the server.
The webservice methods can be called by HTTP (either a browser of cfhttp) and they work. When called using cfinvoke, the server generates an exception. I’ve prepared an example to test and replicate the issue.

Our test server gives the following “uname –a” output:
Linux caussadetest 3.10.0-1062.12.1.el7.x86_64 #1 SMP Thu Dec 12 06:44:49 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
Our ColdFusion 2018 version is:                 2018.0.03.314033

The test example consumers’ refer the webservice by the WSDL URL but this has the same result if we register the webservice and call it by a name.
By making the test example available under the virtual domain ictlinks.emcdda.europa.eu, we have the following scenario:
•	wstest.cfc – The webservice, exposes 2 methods: getFailure and getSuccess;
•	wsclientFailure.cfm – Calls getFailure using cfinvoke and generates the exception shown on the attached word file;
•	wsclientSuccess.cfm – Calls getSuccess using cfinvoke and works as expected;
•	wsclientFailSuc.cfm – Calls getFailure using cfhttp and works as expected;
•	ExceptionThrown.docx – The exception generated by wsclientFailure.cfm.

The difference between the methods getFailure and getSuccess is the return type. getFailure has a returnType of “any” and returns a struct that is transferred as JSON. getSuccess has a returnType of “string” and the response struct is first serialized as JSON before being transmitted; the consumer must then de-serialize before using.
The client wsclientFailSuc.cfm calls the getFailure method and de-serializes the generated JSON before processing.
Through these examples, I believe it is demonstrated that cfinvoke no longer handles correctly webservice methods that have a returnType=”any” (or returnType=”struct”, also tested by me). Probably, it no longer handles complex data types. This works with CF10 (version “10,0,10,284825” on Solaris 11).

Is there a server flag, JVM option or wsdl2java parameter I can provide cfinvoke so that it works on CF2018 as it worked on CF10? Or must I change the applications’ code? And if changing the code is the way to go, should I make the webservice methods’ returnType=”string” and serialize/deserialize JSON or should I replace cfinvoke with cfhttp calls?

Thank you for your time and attention. Please feel free to engage me if you require additional information.

Kind regards,
Duarte

Attachments:

Comments: