Most of this was available on Charlie's site, but here is what I came up
with

 

This will delete ALL WSDLs in cf admin.  I was hoping to get away from
using serviceFactory since that could change w/o notice.  Without
knowing that every WSDL has been given an alias though, I couldn't do
it.

 

It assumes you have access to the admin pwd.  In CF7 (correct me if I am
wrong here), you cannot create a new admin profile with limited access.
You will be able to do that with CF8, which will be nice.  Our
Operatiosn group is not gonna be happy about making the admin pwd
available in code.

 

<cfscript>

   // instantiate and authenticate to admin api

   adminObj =
createObject("component","cfide.adminapi.administrator").login("youradmi
npwd");

   

   // create the extensions object

   extObj = createObject("component","cfide.adminapi.extensions"); 

   

   // create a ServiceFactory object

   sf = createObject("java","coldfusion.server.ServiceFactory"); 

   

   // current webservices

   webservices = sf.getXMLRPCService().getUsernames(); 

 

            if(not structisempty(webservices)) { 

                        for(ws in webservices) { 

                            extObj.deleteWebService(ws,ws); 

                         }

   } 

</cfscript>

 

Mark Davis
Cricket Communications
Software Engineer III

303-734-7694 (w)

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Rouse
Sent: Friday, January 04, 2008 10:35 AM
To: [email protected]
Subject: [houcfug] Re: CF 7 and web service stubs

 

I prefer to throw tires, but perhaps it is just because I have fond
memories of the old Discount Tire commercial where the old lady is not
satisfied and throws her tire through the front window of the store.

On Jan 4, 2008 11:29 AM, Chris Champion <[EMAIL PROTECTED]>
wrote:


About as elegant as a brick through a window.

 

On 1/4/08, Aaron Rouse <[EMAIL PROTECTED]> wrote:

I only skimmed this but I saw where Charlie mentioned within the Admin
API with CF7 that you can get a listing of all web services.  

http://carehart.org/blog/client/index.cfm/2006/12/12/refreshing_web_serv
ices_programmatically

Sounds like the only thing is they will need a name, any name for the
getwebservices() to function correctly.

Of course I am still assuming that restarting the service would not
resolve your issues and that might very well do it.

 

On Jan 4, 2008 10:59 AM, Mark Davis < [EMAIL PROTECTED]>
wrote:

Thanks Aaron.   I saw those but there aren't exactly what I need.  I
could play with this to find I need, but I thought someone might have an
answer already.

 

We have about 15  WSDL stubs cached on each server and I want to
programmatically blow them all away.  The WSDL locations and names can
change, so I don't really want to hard code them all.  Was hoping to
find something that either just deletes them all or even grabs a list of
all existing WSDLs, then I can loop over them and delete them  one at a
time.\

 

I'll keep playing with it.  Thanks

 

Mark Davis
Cricket Communications
Software Engineer III

303-734-7694 (w)

From: [email protected] [mailto: [email protected]
<mailto:[email protected]> ] On Behalf Of Aaron Rouse
Sent: Friday, January 04, 2008 9:54 AM


To: [email protected]
Subject: [houcfug] Re: CF 7 and web service stubs

 

I honestly do not know if they are.  I do know when we ran into a
similar issue that you are experiencing that the only way we could get
the things to regenerate was to use the Service Factory or get one of
the CF Admins to go in the administrator and delete it.  

Our CF Servers back then were supposed to be getting their services
restarted nightly but I honestly do not have 100% confidence they truely
are being restarted nightly.  If they are indeed being restarted then
the answer would be no the stubs do not get regenerated. 

This solution is essentially what I used:

http://www.bpurcell.org/blog/index.cfm?mode=entry&ENTRY=965

Here is another one I just found online: 

http://www.numtopia.com/terry/blog/archives/2006/02/resetting_webservice
s.cfm 

On Jan 4, 2008 10:39 AM, Mark Davis < [EMAIL PROTECTED]>
wrote:

So let me ask this...when you re-start CF service, are the WSDLs
regenerated?  Trying to find a pattern

 

Mark Davis
Cricket Communications
Software Engineer III

303-734-7694 (w)

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Rouse
Sent: Thursday, January 03, 2008 6:45 PM
To: [email protected]
Subject: [houcfug] Re: CF 7 and web service stubs

 

You could use the service factory to remove them so they rebuild.  I
have the code for this at work but would imagine you could find it via
google.  The only downside is you are using undocumented features and
they could change in future releases. 

On Jan 3, 2008 6:56 PM, Mark Davis <[EMAIL PROTECTED]>
wrote:

Running CF 7 and having an issue where, very intermittently, when a
webservice WSDL changes, CF is not regenerating it automatically as it
is supposed to do.  We are having to go into CF admin and delete the
wsdl, then run the call to have CF regen it.  Has anyone else
experienced this?  Does anyone know of an automated way to delete all
web service wsdl's on a server?  We could just add that step to our
deployments and have them all regenerated and not run the risk of CF
forgetting to do it.

 

Thanks

 

Mark Davis
Cricket Communications
Software Engineer III

 

 

 




-- 
Aaron Rouse
http://www.happyhacker.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [EMAIL PROTECTED]
For more options, visit http://groups.google.com/group/houcfug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to