Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (raymondcamden)
Created: 07/10/2014
Components: Web Services
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 6
Copying the text from my blog post here (http://www.raymondcamden.com/2014/7/10/Unexpected-behavior-with-Axis2-web-services-in-ColdFusion):
Credit for this find goes to Steve Seaquist. He and I have been discussing this over email the last few days. Ok, quiz time, look at the following CFC:
component {
variables.weird = 0;
remote numeric function testWeird() {
variables.weird++;
return variables.weird;
}
}
Imagine you are calling this CFC directly from JavaScript code. As you know, each time you call a CFC remotely, it will be created on the fly. So calling this CFC's testWeird method N times will always return 1. However, what happens if you call it as a web service?
If you said 1, you would be wrong. Under Axis2, the CFC is now persistent. I have no idea why. But if you make calls to the CFC as a webservice, you will see that the result increments by one every time you do so. I've got no idea what scope this is living in (my first test was early this morning, hours ago), and the only way to clear this is to edit the CFC itself. (Refreshing the WSDL also does it.) If you add wsversion="1" to the component tag it will use the earlier Axis library and act the right way.
Perhaps this is some known "feature" of Axis2. I did a bit of Googling but nothing really struct me as relevant. Whether good or bad, this is one of those things I did not expect (neither did Steve) so I'm blogging to warn others.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3787631
External Customer Info:
External Company:
External Customer Name: raymondcamden
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: