Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Coos #1
web service issue with boolean data tyoes
When I switched the access method of My CFC to a web service, I noticed that
booleans are outputted differently. When called as a Web Service, a boolean is
outputted as Yes/No. When called as a CFC, a boolean is outputted 1/0. My CFC
is actually returning a Query but the SQL Server BIT columns in the results are
outputting the way described above. I can easily get around it by doing
CAST(Columnname AS INT) in my SQL, but was wondering if this is expected
behavior for a web service? We will initially be having a wireless smartphone
client doing a HTTP XML Post to a CFM page, which then calls the web service,
and outputs XML to the phone using the query results Our engineers working on
the smartphones want booleans to be 1/0 in the XML, not Yes/No. Their XML
parser is a custom built C++ version of Xerces. Any comments would be helpful.
testboolean.cfc ----- <cfcomponent> <cffunction name='test' output='false'
returntype='boolean' access='remote'> <cfset a = 1> <cfreturn a> </cffunction>
</cfcomponent> testboolean.html ----- <cfinvoke
webservice='http://mydomain.com/testboolean.cfc?wsdl' returnvariable='a'
method='test'> Web Service Result: <cfoutput>#a#</cfoutput> (This returns YES)
<br> <cfinvoke component='testboolean' method='test' returnvariable='a'> CFC
Result: <cfoutput>#a#</cfoutput> (This returns 1)
Coos Guest
-
Web Service / SSL Issue
Did you ever get a solution to this problem? I'm just creating some webservices which work perfectly on their own, perfectly under HTTP directory... -
Web Service Deployment issue(s)
Hello, I am just learning the ins and outs of web services and their implementation and I'm having a bit of difficult successfully moving a... -
Boolean column in a data grid
My data grid constains several boolean columns, it is connected to a dataset. Can anyone tell me why i have to click the bool columns (init value... -
Referencing web service complex data type within a second web service (like a delegate)
Hi, I am trying to figure out if ASP.NET XML Web Services and the WSDL standard can handle this type of scenario: I have two web services, and... -
Boolean Data Column Check Box
I am using a DataColumn with the Boolean data type. This produces a check box in the DataGrid displayed on the screen. The problem is, when I try... -
Tom Jordahl #2
Re: web service issue with boolean data tyoes
Yes, this is "expected behavior" for a web service Boolean.
In CFML, YES or 1 or TRUE are all the same.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest



Reply With Quote

