tracker issue : CF-3778682

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

0xFFFD character returned instead of undefined when accessing soap webservice

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Stephen Baker / Stephen Baker (Stephen Baker)

Created: 06/19/2014

Components: Web Services, General

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description:
When consuming a soap webservice which returns a complex structure containing a float.  If the float is nil in ColdFusion 9 getTheFloat() would return an explicit undefined.  In ColdFusion 10 the same code returns the unicode replacement character.

Steps to Reproduce:
Using the following code:
    <CFSET application.ermsInternalWS = CreateObject('webservice', 'http://localhost:8888/ErmsInternal/ErmsInternal.svc?wsdl')>
    <CFSET geo = application.ermsInternalWS.GeocodeAddress('', '', '', '', 55, true)>
    <CFSET lat = geo.getLatitude()>
    <CFDUMP var="#lat#">
    <CFDUMP var="#Asc(lat)#">


ErmsInternal.svc is a WCF webservice which returns the response pasted here: http://pastebin.com/ywTJymXp

Actual Result:
Asc(lat) = 65533

Expected Result:
lat should be "undefined"

Any Workarounds:
Test IsNull(lat) for CF9 and IsNumeric(lat) for CF10.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3778682

External Customer Info:
External Company:  
External Customer Name: TheCycoONE
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows Server 2008 R2

ColdFusion 10 64-bit

Attachments:

  1. December 18, 2014 00:00:00: 1_nulltest.cfm

Comments:

Unable to repro this case, when tried with null value. Code used to repro - ws.cfc : <cfcomponent accessors="true"> <cffunction name="trial" access="remote" returntype="struct"> <cfset var retVal = StructNew()> <cfset retVal.val= javaCast( "null", 0 ) /> <cfreturn retVal> </cffunction> </cfcomponent> test.cfm : <CFSET application.testws = CreateObject('webservice', 'http://<server IP>:<port>/<location path>/ws.cfc?wsdl')> <CFSET geo = application.testws.trial()> <cfdump var="#geo#"> <cfoutput>#isnull(geo.val)#</cfoutput> <cfoutput>#asc(geo.val)#</cfoutput>
Comment by Akhila K.
11842 | August 18, 2014 11:04:04 PM GMT
The value is tested which is found null, but when checked against Asc function, it does return "undefined" . Please provide us more details to repro the case.
Comment by Akhila K.
11843 | August 18, 2014 11:09:44 PM GMT
Ok, specifically I'm testing against a .NET WCF service. I've written a larger test that you should be able to use, and a service that's publicly accessible. As you can see, the value returned depends on the type of field where the NULL is. String reacts properly, but Int and Double return -2147483648 and the 0xFFFD character respectfully. <CFOUTPUT> <html> <head> <title>Null Test</title> </head> <body> <CFSET wcf = CreateObject("webservice", "https://vdev225.ermscorp.com/_tests/NullTest/Service1.svc?wsdl")> <CFSET topNull = wcf.GetNullInt()> GetNullInt: <CFDUMP var="#topNull#"><br> GetNullInt (ASC): <CFDUMP var="#Asc(topNull)#"><br> <CFSET thing = wcf.GetThing()> Thing.Value: <CFDUMP var="#thing.getValue()#"><br> Thing.Value (ASC): <CFDUMP var="#Asc(thing.getValue())#"><br> <CFSET topNull = wcf.GetNullString()> <CFIF IsDefined("topNull")> GetNullString: <CFDUMP var="#topNull#"><br> GetNullString (ASC): <CFDUMP var="#Asc(topNull)#"><br> <CFELSE> GetNullString: Undefined<br> </CFIF> <CFSET topNull = wcf.GetNullDouble()> GetNullDouble: <CFDUMP var="#topNull#"><br> GetNullDouble (ASC): <CFDUMP var="#Asc(topNull)#"><br> </body> </html> </CFOUTPUT>
Comment by External U.
11844 | August 19, 2014 10:32:10 AM GMT
The URL, https://vdev225.ermscorp.com/_tests/NullTest/Service1.svc?wsdl , does not seem to be public. Please provide us the working URL. Thanks.
Comment by Akhila K.
11845 | September 10, 2014 02:31:28 AM GMT
I believe the example had been removed sometime between then and now through a git reset or cleanup. Please try again now.
Comment by External U.
11846 | September 10, 2014 06:57:32 AM GMT
The URL does not seem to work even now. Since its been a while and is failing to work, we are closing this bug. Incase if user is still facing the issue and wants it to be fixed, please let us know. We will look into it.Thanks.
Comment by Akhila K.
11847 | December 03, 2014 04:38:57 AM GMT
The issue still exists. I can't keep that webservice example running on that URL. I'll try setting it up in another location less tied to my development.
Comment by External U.
11848 | December 17, 2014 12:29:48 PM GMT
Ok, I've put the webservice up at http://vdev225.ermscorp.com:8000/Service1.svc?wsdl This is no longer in a directory that will be affected my development work, so hopefully it's available when you test.
Comment by External U.
11849 | December 17, 2014 01:55:51 PM GMT
I updated my test scrtipt (attached). The output is: GetNullInt Value: -2147483648 ASC: 45 IsNull: NO IsNumeric: YES GetThing Thing.Value: -2147483648 Thing.Value (ASC): 45 GetNullString Value: Undefined GetNullDouble Value: ? ASC: 65533 IsNull: NO IsNumeric: YES GetNullFloat Value: NaN ASC: 78 IsNull: NO IsNumeric: YES
Comment by External U.
11850 | December 17, 2014 02:11:19 PM GMT
Oddly as you can see in my last test results IsNumeric returned yes, but IsNumeric(Chr(65533)) returns NO. There must be some hidden difference or type information.
Comment by External U.
11851 | January 07, 2015 03:15:38 PM GMT