Hello Guys,

 

I'm having a very strange issue with Web Services, well, maybe it's NOT
strange, I'm just new to it :-D

 

I have two identical functions, with different names within the component,
yet when I call them, one works, the other doesn't.

 

<cfcomponent name="Location" displayname="Location Management" hint="I
handle unit network location details." output="false">

      

      <!--- Update IP Address --->

      <cffunction name="setIP" access="remote" output="false"
returntype="boolean" hin="I update the units IP address">

            <cfargument name="UUID" type="string" required="true" hint="I'm
the UUID for the unit calling in." />

                  

                  <!--- Set Temporary Local Structure --->

                  <cfset var LOCAL = structNew() />

                  

                  <!--- Set Units Calling IP Address --->

                  <cfset LOCAL.UnitIP = CGI.REMOTE_ADDR />

                  

                  <!--- Query To Update System Record --->

                  <cfquery name="LOCAL.IpUpdate"
datasource="#Application.DSN#">

                        UPDATE UnitIP

                        SET   IP = <cfqueryparam value="#LOCAL.UnitIP#"
cfsqltype="cf_sql_varchar" />,

                              Logged = <cfqueryparam
value="#dateformat(now(),"yyyy-mm-dd")# #timeformat(now(), "HH:MM:SS")#"
cfsqltype="timestamp" />

                        WHERE UnitID = <cfqueryparam
value="#ARGUMENTS.UUID#" cfsqltype="cf_sql_integer" />

                  </cfquery>

                  

            <cfreturn true />

      </cffunction>

 

      <!--- Get XML Configuration --->

      <cffunction name="getConfig2" access="remote" output="false"
returntype="boolean" hin="I update the units IP address">

            <cfargument name="UUID" type="string" required="true" hint="I'm
the UUID for the unit calling in." />

                  

                  <!--- Set Temporary Local Structure --->

                  <cfset var LOCAL = structNew() />

                  

                  <!--- Set Units Calling IP Address --->

                  <cfset LOCAL.UnitIP = CGI.REMOTE_ADDR />

                  

                  <!--- Query To Update System Record --->

                  <cfquery name="LOCAL.IpUpdate"
datasource="#Application.DSN#">

                        UPDATE UnitIP

                        SET   IP = <cfqueryparam value="#LOCAL.UnitIP#"
cfsqltype="cf_sql_varchar" />,

                              Logged = <cfqueryparam
value="#dateformat(now(),"yyyy-mm-dd")# #timeformat(now(), "HH:MM:SS")#"
cfsqltype="timestamp" />

                        WHERE UnitID = <cfqueryparam
value="#ARGUMENTS.UUID#" cfsqltype="cf_sql_integer" />

                  </cfquery>

                  

            <cfreturn true />

      </cffunction>

 

</cfcomponent>

 

Thats the code from my component, now take a look at these calls

 

<cfinvoke
webservice="http://www.mydomain.co.uk/webservicetester/ip.cfc?wsdl";
method="setIP" returnvariable="aResult">

      <cfinvokeargument name="UUID" value="1"/>

</cfinvoke>

 

<cfdump var="#aResult#">

 

<cfinvoke
webservice="http://www.mydomain.co.uk/webservicetester/ip.cfc?wsdl";
method="getConfig2" returnvariable="aResult">

      <cfinvokeargument name="UUID" value="1"/>

</cfinvoke>

 

<cfdump var="#aResult#">

 

Now the 'setIP' function works fine and returns as expected, but the
'getConfig2' does not for some reason, they are identical in every way,
except the name, I'm lost!!!

 

Thanks guys,

 

Rawlins



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275061
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to