Try this....

CFC code:

<cfcomponent>
        <cffunction name="returnLines" access="remote"
returnType="query">

        <cfargument name="orderID" type="numeric" required="yes">

                <cfquery name="getLines"
Datasource="#application.appDataSource#" username="listdev"
password="RMH383">
                        SELECT Line_name AS "NAME", Line_id AS "ID"
                        FROM Lines
                        WHERE Order_id LIKE '%#arguments.orderID#%'
                        ORDER BY Line_id;
                </cfquery>

                <cfreturn getLines>
        </cffunction>
 
 </cfcomponent>

WebService code:

<mx:WebService id="xmlService" 
 wsdl="http://192.168.10.17/DistrictsLT9/People.cfc?wsdl";>
       <mx:operation name="returnLines">
         <mx:request>
                <orderID>100</orderID>  
         </mx:request>
       </mx:operation>
 </mx:WebService>

-Ashish

 

> -----Original Message-----
> From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of flexblog5333
> Sent: Tuesday, September 06, 2005 2:13 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Web Service Input Variable
> 
> I have successfully got my Web Service to perform querys using a .cfc 
> but I cannot for the life of me figure out the syntax to pass in and 
> call a single variable in the query.  Any help would be greatly 
> appreciated.  Thanks ahead of time.
> 
> My .mxml Code:
> 
> 
> <mx:WebService id="xmlService" 
> wsdl="http://192.168.10.17/DistrictsLT9/People.cfc?wsdl";>
>       <mx:operation name="returnLines">
>         <mx:request>
>               VARIABLE??      
>         </mx:request>
>       </mx:operation>
> </mx:WebService>
> 
> My .cfc Code:
> 
> <cfcomponent>
>       <cffunction name="returnLines" access="remote"   
> returnType="query">
>               <cfquery name="getLines" 
> Datasource="#application.appDataSource#" username="listdev" 
> password="RMH383">
>                       SELECT Line_name AS "NAME", Line_id AS "ID"
>                       FROM Lines
>                       WHERE Order_id LIKE '%VARIABLE??%'
>                       ORDER BY Line_id;
>               </cfquery>
>               <cfreturn getLines>
>       </cffunction>
> 
> </cfcomponent>
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> --------------------~--> 
> Most low income households are not online. Help bridge the 
> digital divide today!
> http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
> --------------------------------------------------------------
> ------~-> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to