Link to home
Start Free TrialLog in
Avatar of james_lh
james_lh

asked on

Best Practice for consuming Web Services

We have a .net web service that I am consuming with Cold Fusion. Every thing is working fine, but I have a question regarding the best way to connect. I created a cfc that has an init method something like this:

<cffunction name="init" hint="initialize web service" returntype="NavConnect">
          <cfobject webservice="#THIS.wsUrl#" name="THIS.navCon" />
        <cfreturn this>
    </cffunction>

The rest of the cfc just makes the calls to the service. I'd like to put the cfc in a scope that's available throughout the application as many different pages may need to hit the service. Maybe in the application scope in the onApplicationStart method? However, I'm not sure if that's a good idea. Can anyone shed some light on this for me? Are there any issues that would arise with holding an open web service connection in the application scope?
ASKER CERTIFIED SOLUTION
Avatar of james_lh
james_lh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial