View Javadoc

1   /*
2    * $Id: AxisConnector.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.providers.soap.axis;
12  
13  import org.mule.MuleManager;
14  import org.mule.config.ExceptionHelper;
15  import org.mule.config.i18n.CoreMessages;
16  import org.mule.impl.MuleDescriptor;
17  import org.mule.impl.endpoint.MuleEndpoint;
18  import org.mule.impl.internal.notifications.ManagerNotification;
19  import org.mule.impl.internal.notifications.ManagerNotificationListener;
20  import org.mule.impl.model.ModelHelper;
21  import org.mule.providers.AbstractConnector;
22  import org.mule.providers.http.servlet.ServletConnector;
23  import org.mule.providers.service.TransportFactory;
24  import org.mule.providers.soap.MethodFixInterceptor;
25  import org.mule.providers.soap.axis.extensions.MuleConfigProvider;
26  import org.mule.providers.soap.axis.extensions.MuleTransport;
27  import org.mule.providers.soap.axis.extensions.WSDDFileProvider;
28  import org.mule.providers.soap.axis.extensions.WSDDJavaMuleProvider;
29  import org.mule.umo.UMOComponent;
30  import org.mule.umo.UMOException;
31  import org.mule.umo.endpoint.UMOEndpoint;
32  import org.mule.umo.endpoint.UMOEndpointURI;
33  import org.mule.umo.lifecycle.InitialisationException;
34  import org.mule.umo.manager.UMOServerNotification;
35  import org.mule.umo.model.UMOModel;
36  import org.mule.umo.provider.UMOMessageReceiver;
37  import org.mule.util.ClassUtils;
38  import org.mule.util.MuleUrlStreamHandlerFactory;
39  
40  import java.util.ArrayList;
41  import java.util.HashMap;
42  import java.util.Iterator;
43  import java.util.List;
44  import java.util.Map;
45  
46  import javax.xml.namespace.QName;
47  
48  import org.apache.axis.client.Call;
49  import org.apache.axis.configuration.SimpleProvider;
50  import org.apache.axis.deployment.wsdd.WSDDConstants;
51  import org.apache.axis.deployment.wsdd.WSDDProvider;
52  import org.apache.axis.encoding.TypeMappingRegistryImpl;
53  import org.apache.axis.encoding.ser.BeanDeserializerFactory;
54  import org.apache.axis.encoding.ser.BeanSerializerFactory;
55  import org.apache.axis.handlers.soap.SOAPService;
56  import org.apache.axis.server.AxisServer;
57  import org.apache.axis.wsdl.fromJava.Namespaces;
58  import org.apache.axis.wsdl.fromJava.Types;
59  
60  /**
61   * <code>AxisConnector</code> is used to maintain one or more Services for Axis
62   * server instance.
63   * <p>
64   * Some of the Axis specific service initialisation code was adapted from the Ivory
65   * project (http://ivory.codehaus.org). Thanks guys :)
66   */
67  public class AxisConnector extends AbstractConnector implements ManagerNotificationListener
68  {
69      /* Register the AxisFault Exception reader if this class gets loaded */
70      static
71      {
72          ExceptionHelper.registerExceptionReader(new AxisFaultExceptionReader());
73      }
74  
75      public static final QName QNAME_MULE_PROVIDER = new QName(WSDDConstants.URI_WSDD_JAVA, "Mule");
76      public static final QName QNAME_MULE_TYPE_MAPPINGS = new QName("http://www.muleumo.org/ws/mappings",
77          "Mule");
78      public static final String DEFAULT_MULE_NAMESPACE_URI = "http://www.muleumo.org";
79  
80      public static final String DEFAULT_MULE_AXIS_SERVER_CONFIG = "mule-axis-server-config.wsdd";
81      public static final String DEFAULT_MULE_AXIS_CLIENT_CONFIG = "mule-axis-client-config.wsdd";
82      public static final String AXIS_SERVICE_COMPONENT_NAME = "_axisServiceComponent";
83      public static final String AXIS_SERVICE_PROPERTY = "_axisService";
84      public static final String AXIS_CLIENT_CONFIG_PROPERTY = "clientConfig";
85  
86      public static final String SERVICE_PROPERTY_COMPONENT_NAME = "componentName";
87      public static final String SERVICE_PROPERTY_SERVCE_PATH = "servicePath";
88  
89      public static final String WSDL_URL_PROPERTY = "wsdlUrl";
90  
91      private String serverConfig;
92      private AxisServer axisServer;
93      private SimpleProvider serverProvider;
94      private String clientConfig;
95      private SimpleProvider clientProvider;
96  
97      private List beanTypes;
98      private MuleDescriptor axisDescriptor;
99      
100     //this will store the name of the descriptor of the current connector's AxisServiceComponent
101     private String specificAxisServiceComponentName;
102 
103     /**
104      * These protocols will be set on client invocations. by default Mule uses it's
105      * own transports rather that Axis's. This is only because it gives us more
106      * flexibility inside Mule and simplifies the code
107      */
108     private Map axisTransportProtocols;
109 
110     /**
111      * A store of registered servlet services that need to have their endpoints
112      * re-written with the 'real' http url instead of the servlet:// one. This is
113      * only required to ensure wsdl is generated correctly. I would like a clearer
114      * way of doing this so I can remove this workaround
115      */
116     private List servletServices = new ArrayList();
117 
118     private List supportedSchemes;
119 
120     private boolean doAutoTypes = true;
121 
122     private boolean treatMapAsNamedParams = true;
123 
124     public AxisConnector()
125     {
126         super();
127         registerProtocols();
128 
129     }
130 
131     protected void registerProtocols()
132     {
133         // Default supported schemes, these can be restricted
134         // through configuration
135         supportedSchemes = new ArrayList();
136         supportedSchemes.add("http");
137         supportedSchemes.add("https");
138         supportedSchemes.add("servlet");
139         supportedSchemes.add("vm");
140         supportedSchemes.add("jms");
141         supportedSchemes.add("xmpp");
142         supportedSchemes.add("smtp");
143         supportedSchemes.add("smtps");
144         supportedSchemes.add("pop3");
145         supportedSchemes.add("pop3s");
146         supportedSchemes.add("imap");
147         supportedSchemes.add("imaps");
148         supportedSchemes.add("ssl");
149         supportedSchemes.add("tcp");
150 
151         for (Iterator iterator = supportedSchemes.iterator(); iterator.hasNext();)
152         {
153             String s = (String) iterator.next();
154             registerSupportedProtocol(s);
155         }
156     }
157 
158     protected void doInitialise() throws InitialisationException
159     {
160         axisTransportProtocols = new HashMap();
161         specificAxisServiceComponentName = AXIS_SERVICE_COMPONENT_NAME + "_" + name;
162         
163         try
164         {
165             for (Iterator iterator = supportedSchemes.iterator(); iterator.hasNext();)
166             {
167                 String s = (String)iterator.next();
168                 axisTransportProtocols.put(s, MuleTransport.getTransportClass(s));
169                 registerSupportedProtocol(s);
170             }
171             MuleManager.getInstance().registerListener(this);
172         }
173         catch (Exception e)
174         {
175             throw new InitialisationException(e, this);
176         }
177 
178         if (serverConfig == null)
179         {
180             serverConfig = DEFAULT_MULE_AXIS_SERVER_CONFIG;
181         }
182         if (clientConfig == null)
183         {
184             clientConfig = DEFAULT_MULE_AXIS_CLIENT_CONFIG;
185         }
186         serverProvider = createAxisProvider(serverConfig);
187         clientProvider = createAxisProvider(clientConfig);
188 
189         // Create the AxisServer
190         axisServer = new AxisServer(serverProvider);
191         axisServer.setOption("axis.doAutoTypes", Boolean.valueOf(doAutoTypes));
192 
193         // Register the Mule service serverProvider
194         WSDDProvider.registerProvider(QNAME_MULE_PROVIDER, new WSDDJavaMuleProvider(this));
195 
196         try
197         {
198             registerTransportTypes();
199         }
200         catch (ClassNotFoundException e)
201         {
202             throw new InitialisationException(
203                 CoreMessages.cannotLoadFromClasspath(e.getMessage()), e, this);
204         }
205 
206         // Register all our UrlStreamHandlers here so they can be resolved. This is necessary
207         // to make Mule work in situations where modification of system properties at runtime
208         // is not reliable, e.g. when running in maven's surefire test executor.
209         MuleUrlStreamHandlerFactory.registerHandler("jms", new org.mule.providers.soap.axis.transport.jms.Handler());
210         MuleUrlStreamHandlerFactory.registerHandler("pop3", new org.mule.providers.soap.axis.transport.pop3.Handler());
211         MuleUrlStreamHandlerFactory.registerHandler("smtp", new org.mule.providers.soap.axis.transport.smtp.Handler());
212         MuleUrlStreamHandlerFactory.registerHandler("vm", new org.mule.providers.soap.axis.transport.vm.Handler());
213 
214         try
215         {
216             registerTypes((TypeMappingRegistryImpl)axisServer.getTypeMappingRegistry(), beanTypes);
217         }
218         catch (ClassNotFoundException e)
219         {
220             throw new InitialisationException(e, this);
221         }
222     }
223 
224     protected void registerTransportTypes() throws ClassNotFoundException
225     {
226         // Register Transport handlers
227         // By default these will all be handled by Mule, however some companies may
228         // have
229         // their own they wish to use
230         for (Iterator iterator = getAxisTransportProtocols().keySet().iterator(); iterator.hasNext();)
231         {
232             String protocol = (String)iterator.next();
233             Object temp = getAxisTransportProtocols().get(protocol);
234             Class clazz;
235             if (temp instanceof String)
236             {
237                 clazz = ClassUtils.loadClass(temp.toString(), getClass());
238             }
239             else
240             {
241                 clazz = (Class) temp;
242             }
243             Call.setTransportForProtocol(protocol, clazz);
244         }
245     }
246 
247     protected SimpleProvider createAxisProvider(String config) throws InitialisationException
248     {
249         // Use our custom file provider that does not require services to be declared
250         // in the WSDD. This only affects the
251         // client side as the client will fallback to the FileProvider when invoking
252         // a service.
253         WSDDFileProvider fileProvider = new WSDDFileProvider(config);
254         fileProvider.setSearchClasspath(true);
255         /*
256          * Wrap the FileProvider with a SimpleProvider so we can programmatically
257          * configure the Axis server (you can only use wsdd descriptors with the
258          * FileProvider)
259          */
260         return new MuleConfigProvider(fileProvider);
261     }
262 
263     public String getProtocol()
264     {
265         return "axis";
266     }
267 
268     /**
269      * The method determines the key used to store the receiver against.
270      * 
271      * @param component the component for which the endpoint is being registered
272      * @param endpoint the endpoint being registered for the component
273      * @return the key to store the newly created receiver against. In this case it
274      *         is the component name, which is equivalent to the Axis service name.
275      */
276     protected Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
277     {
278         if (endpoint.getEndpointURI().getPort() == -1)
279         {
280             return component.getDescriptor().getName();
281         }
282         else
283         {
284             return endpoint.getEndpointURI().getAddress() + "/" + component.getDescriptor().getName();
285         }
286     }
287 
288     public UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint) throws Exception
289     {
290         // this is always initialised as synchronous as ws invocations should
291         // always execute in a single thread unless the endpoint has explicitly
292         // been set to run asynchronously
293         if (!endpoint.isSynchronousSet() && !endpoint.isSynchronous())
294         {
295             if (logger.isDebugEnabled())
296             {
297                 logger.debug("overriding endpoint synchronicity and setting it to true. Web service requests are executed in a single thread");
298             }
299             endpoint.setSynchronous(true);
300         }
301 
302         return super.createReceiver(component, endpoint);
303     }
304 
305     protected void unregisterReceiverWithMuleService(UMOMessageReceiver receiver, UMOEndpointURI ep)
306         throws UMOException
307     {
308         String endpointKey = getCounterEndpointKey(receiver.getEndpointURI());
309 
310         for (Iterator iterator = axisDescriptor.getInboundRouter().getEndpoints().iterator(); iterator.hasNext();)
311         {
312             UMOEndpoint umoEndpoint = (UMOEndpoint)iterator.next();
313             if (endpointKey.startsWith(umoEndpoint.getEndpointURI().getAddress()))
314             {
315                 logger.info("Unregistering Axis endpoint: " + endpointKey + " for service: "
316                             + receiver.getComponent().getDescriptor().getName());
317             }
318             try
319             {
320                 umoEndpoint.getConnector()
321                     .unregisterListener(receiver.getComponent(), receiver.getEndpoint());
322             }
323             catch (Exception e)
324             {
325                 logger.error("Failed to unregister Axis endpoint: " + endpointKey + " for service: "
326                              + receiver.getComponent().getDescriptor().getName() + ". Error is: "
327                              + e.getMessage(), e);
328             }
329             // TODO why break? For does not loop.
330             break;
331         }
332     }
333 
334     protected void registerReceiverWithMuleService(UMOMessageReceiver receiver, UMOEndpointURI ep)
335         throws UMOException
336     {
337         // If this is the first receiver we need to create the Axis service
338         // component
339         // this will be registered with Mule when the Connector starts
340         if (axisDescriptor == null)
341         {
342             // See if the axis descriptor has already been added. This allows
343             // developers to override the default configuration, say to increase
344             // the threadpool
345             axisDescriptor = getAxisDescriptorFromSystemModel();
346             if (axisDescriptor == null)
347             {
348                 axisDescriptor = createAxisDescriptor();
349             }
350             else
351             {
352                 // Lets unregister the 'template' instance, configure it and
353                 // then register
354                 // again later
355                 MuleManager.getInstance().lookupModel(ModelHelper.SYSTEM_MODEL).unregisterComponent(axisDescriptor);
356                 
357                 //if the descriptor still contains the original AXIS_SERVICE_COMPONENT_NAME name,
358                 //we need to change it to the specific name which is AXIS_SERVICE_COMPONENT_NAME_<connector_name>
359                 if (AXIS_SERVICE_COMPONENT_NAME.equals(axisDescriptor.getName()))
360                 {
361                     axisDescriptor.setName(specificAxisServiceComponentName);
362                 }
363             }
364             // if the axis server hasn't been set, set it now. The Axis server
365             // may be set
366             // externally
367             if (axisDescriptor.getProperties().get("axisServer") == null)
368             {
369                 axisDescriptor.getProperties().put("axisServer", axisServer);
370             }
371             axisDescriptor.setContainerManaged(false);
372         }
373         String serviceName = receiver.getComponent().getDescriptor().getName();
374         // No determine if the endpointUri requires a new connector to be
375         // registed in the case of http we only need to register the new endpointUri
376         // if
377         // the port is different
378         // If we're using VM or Jms we just use the resource infor directly without
379         // appending a service name
380         String endpoint;
381         String scheme = ep.getScheme().toLowerCase();
382         if (scheme.equals("jms") || scheme.equals("vm"))
383         {
384             endpoint = ep.toString();
385         }
386         else
387         {
388             endpoint = receiver.getEndpointURI().getAddress() + "/" + serviceName;
389         }
390         if (logger.isDebugEnabled())
391         {
392             logger.debug("Modified endpoint with " + scheme + " scheme to " + endpoint);
393         }
394 
395         // Default to using synchronous for socket based protocols unless the
396         // synchronous property has been set explicitly
397         boolean sync = false;
398         if (!receiver.getEndpoint().isSynchronousSet())
399         {
400             if (scheme.equals("http") || scheme.equals("https") || scheme.equals("ssl")
401                 || scheme.equals("tcp"))
402             {
403                 sync = true;
404             }
405         }
406         else
407         {
408             sync = receiver.getEndpoint().isSynchronous();
409         }
410 
411         UMOEndpoint serviceEndpoint = new MuleEndpoint(endpoint, true);
412         serviceEndpoint.setSynchronous(sync);
413         serviceEndpoint.setName(ep.getScheme() + ":" + serviceName);
414         // set the filter on the axis endpoint on the real receiver endpoint
415         serviceEndpoint.setFilter(receiver.getEndpoint().getFilter());
416         // Remove the Axis filter now
417         receiver.getEndpoint().setFilter(null);
418 
419         // set the Security filter on the axis endpoint on the real receiver endpoint
420         serviceEndpoint.setSecurityFilter(receiver.getEndpoint().getSecurityFilter());
421         // Remove the Axis Receiver Security filter now
422         receiver.getEndpoint().setSecurityFilter(null);
423 
424         if (receiver.getEndpoint().getTransformer() != null)
425         {
426             serviceEndpoint.setTransformer(receiver.getEndpoint().getTransformer());
427             receiver.getEndpoint().setTransformer(null);
428         }
429         
430         //set transaction properties
431         if(receiver.getEndpoint().getTransactionConfig()!= null)
432         {
433             serviceEndpoint.setTransactionConfig(receiver.getEndpoint().getTransactionConfig());
434             receiver.getEndpoint().setTransactionConfig(null);
435         }
436         
437         // propagate properties to the service endpoint
438         serviceEndpoint.getProperties().putAll(receiver.getEndpoint().getProperties());
439 
440         axisDescriptor.getInboundRouter().addEndpoint(serviceEndpoint);
441 
442     }
443 
444     private String getCounterEndpointKey(UMOEndpointURI endpointURI)
445     {
446         StringBuffer endpointKey = new StringBuffer(64);
447 
448         endpointKey.append(endpointURI.getScheme());
449         endpointKey.append("://");
450         endpointKey.append(endpointURI.getHost());
451         if (endpointURI.getPort() > -1)
452         {
453             endpointKey.append(":");
454             endpointKey.append(endpointURI.getPort());
455         }
456         return endpointKey.toString();
457     }
458     
459     private MuleDescriptor getAxisDescriptorFromSystemModel()
460     {
461         MuleDescriptor axisDescriptor = (MuleDescriptor) MuleManager.getInstance().lookupModel(ModelHelper.SYSTEM_MODEL).getDescriptor(
462             specificAxisServiceComponentName);
463         
464         if (axisDescriptor == null)
465         {
466             axisDescriptor = (MuleDescriptor) MuleManager.getInstance().lookupModel(ModelHelper.SYSTEM_MODEL).getDescriptor(
467                 AXIS_SERVICE_COMPONENT_NAME);
468             
469 //            if (axisDescriptor != null)
470 //            {
471 //                axisDescriptor.setName(specificAxisServiceComponentName);
472 //            }
473         }
474         
475         return axisDescriptor;
476     }
477 
478     protected MuleDescriptor createAxisDescriptor()
479     {
480         MuleDescriptor axisDescriptor = getAxisDescriptorFromSystemModel();
481         
482         if (axisDescriptor == null)
483         {
484             axisDescriptor = new MuleDescriptor(specificAxisServiceComponentName);
485             axisDescriptor.setImplementation(AxisServiceComponent.class.getName());
486         }
487         
488         return axisDescriptor;
489     }
490 
491     /**
492      * Template method to perform any work when starting the connectoe
493      * 
494      * @throws org.mule.umo.UMOException if the method fails
495      */
496     protected void doStart() throws UMOException
497     {
498         axisServer.start();
499     }
500 
501     /**
502      * Template method to perform any work when stopping the connectoe
503      * 
504      * @throws org.mule.umo.UMOException if the method fails
505      */
506     protected void doStop() throws UMOException
507     {
508         axisServer.stop();
509         // UMOModel model = MuleManager.getInstance().lookupModel();
510         // model.unregisterComponent(model.getDescriptor(AXIS_SERVICE_COMPONENT_NAME));
511     }
512 
513     protected void doConnect() throws Exception
514     {
515         // template method
516     }
517 
518     protected void doDisconnect() throws Exception
519     {
520         // template method
521     }
522 
523     protected void doDispose()
524     {
525         // template method
526     }
527 
528     public String getServerConfig()
529     {
530         return serverConfig;
531     }
532 
533     public void setServerConfig(String serverConfig)
534     {
535         this.serverConfig = serverConfig;
536     }
537 
538     public List getBeanTypes()
539     {
540         return beanTypes;
541     }
542 
543     public void setBeanTypes(List beanTypes)
544     {
545         this.beanTypes = beanTypes;
546     }
547 
548     public String getClientConfig()
549     {
550         return clientConfig;
551     }
552 
553     public void setClientConfig(String clientConfig)
554     {
555         this.clientConfig = clientConfig;
556     }
557 
558     public AxisServer getAxisServer()
559     {
560         return axisServer;
561     }
562 
563     public void setAxisServer(AxisServer axisServer)
564     {
565         this.axisServer = axisServer;
566     }
567 
568     public SimpleProvider getServerProvider()
569     {
570         return serverProvider;
571     }
572 
573     public void setServerProvider(SimpleProvider serverProvider)
574     {
575         this.serverProvider = serverProvider;
576     }
577 
578     public SimpleProvider getClientProvider()
579     {
580         return clientProvider;
581     }
582 
583     public void setClientProvider(SimpleProvider clientProvider)
584     {
585         this.clientProvider = clientProvider;
586     }
587 
588     public Map getAxisTransportProtocols()
589     {
590         return axisTransportProtocols;
591     }
592 
593     public void setAxisTransportProtocols(Map axisTransportProtocols)
594     {
595         this.axisTransportProtocols.putAll(axisTransportProtocols);
596     }
597 
598     void addServletService(SOAPService service)
599     {
600         servletServices.add(service);
601     }
602 
603     public List getSupportedSchemes()
604     {
605         return supportedSchemes;
606     }
607 
608     public void setSupportedSchemes(List supportedSchemes)
609     {
610         this.supportedSchemes = supportedSchemes;
611     }
612 
613     public boolean isDoAutoTypes()
614     {
615         return doAutoTypes;
616     }
617 
618     public void setDoAutoTypes(boolean doAutoTypes)
619     {
620         this.doAutoTypes = doAutoTypes;
621     }
622 
623     void registerTypes(TypeMappingRegistryImpl registry, List types) throws ClassNotFoundException
624     {
625         if (types != null)
626         {
627             Class clazz;
628             for (Iterator iterator = types.iterator(); iterator.hasNext();)
629             {
630                 clazz = ClassUtils.loadClass(iterator.next().toString(), getClass());
631                 String localName = Types.getLocalNameFromFullName(clazz.getName());
632                 QName xmlType = new QName(Namespaces.makeNamespace(clazz.getName()), localName);
633 
634                 registry.getDefaultTypeMapping().register(clazz, xmlType,
635                     new BeanSerializerFactory(clazz, xmlType), new BeanDeserializerFactory(clazz, xmlType));
636             }
637         }
638     }
639 
640     public boolean isTreatMapAsNamedParams()
641     {
642         return treatMapAsNamedParams;
643     }
644 
645     public void setTreatMapAsNamedParams(boolean treatMapAsNamedParams)
646     {
647         this.treatMapAsNamedParams = treatMapAsNamedParams;
648     }
649 
650     public void onNotification(UMOServerNotification notification)
651     {
652         if (notification.getAction() == ManagerNotification.MANAGER_STARTED_MODELS)
653         {
654             // We need to register the Axis service component once the model
655             // starts because
656             // when the model starts listeners on components are started, thus
657             // all listener
658             // need to be registered for this connector before the Axis service
659             // component
660             // is registered.
661             // The implication of this is that to add a new service and a
662             // different http port the
663             // model needs to be restarted before the listener is available
664             UMOModel systemModel = MuleManager.getInstance().lookupModel(ModelHelper.SYSTEM_MODEL);
665             if (!systemModel.isComponentRegistered(specificAxisServiceComponentName))
666             {
667                 try
668                 {
669                     // Descriptor might be null if no inbound endpoints have been
670                     // register for the Axis connector
671                     if (axisDescriptor == null)
672                     {
673                         axisDescriptor = createAxisDescriptor();
674                     }
675                     axisDescriptor.addInterceptor(new MethodFixInterceptor());
676                     MuleManager.getInstance().lookupModel(ModelHelper.SYSTEM_MODEL).registerComponent(axisDescriptor);
677                     // We have to perform a small hack here to rewrite servlet://
678                     // endpoints with the
679                     // real http:// address
680                     for (Iterator iterator = servletServices.iterator(); iterator.hasNext();)
681                     {
682                         SOAPService service = (SOAPService)iterator.next();
683                         ServletConnector servletConnector = (ServletConnector) TransportFactory.getConnectorByProtocol("servlet");
684                         String url = servletConnector.getServletUrl();
685                         if (url != null)
686                         {
687                             service.getServiceDescription().setEndpointURL(url + "/" + service.getName());
688                         }
689                         else
690                         {
691                             logger.error("The servletUrl property on the ServletConntector has not been set this means that wsdl generation for service '"
692                                          + service.getName() + "' may be incorrect");
693                         }
694                     }
695                     servletServices.clear();
696                     servletServices = null;
697 
698                 }
699                 catch (UMOException e)
700                 {
701                     handleException(e);
702                 }
703             }
704         }
705     }
706 }