< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java

Print this page




 324         }
 325         this.wsdlService = service;
 326 
 327         if (serviceClass != Service.class) {
 328             //if @HandlerChain present, set HandlerResolver on service context
 329             HandlerChain handlerChain =
 330                     AccessController.doPrivileged(new PrivilegedAction<HandlerChain>() {
 331                         public HandlerChain run() {
 332                             return serviceClass.getAnnotation(HandlerChain.class);
 333                         }
 334                     });
 335             if (handlerChain != null)
 336                 handlerConfigurator = new AnnotationConfigurator(this);
 337         }
 338 
 339     }
 340 
 341     /**
 342      * Parses the WSDL and builds {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLModel}.
 343      * @param wsdlDocumentLocation
 344      *      Either this or <tt>wsdl</tt> parameter must be given.
 345      *      Null location means the system won't be able to resolve relative references in the WSDL,
 346      */
 347     private WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
 348         try {
 349             return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(),
 350                 true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray());
 351         } catch (IOException e) {
 352             throw new WebServiceException(e);
 353         } catch (XMLStreamException e) {
 354             throw new WebServiceException(e);
 355         } catch (SAXException e) {
 356             throw new WebServiceException(e);
 357         } catch (ServiceConfigurationError e) {
 358             throw new WebServiceException(e);
 359         }
 360     }
 361 
 362     protected EntityResolver createCatalogResolver() {
 363         return createDefaultCatalogResolver();
 364     }
 365 




 324         }
 325         this.wsdlService = service;
 326 
 327         if (serviceClass != Service.class) {
 328             //if @HandlerChain present, set HandlerResolver on service context
 329             HandlerChain handlerChain =
 330                     AccessController.doPrivileged(new PrivilegedAction<HandlerChain>() {
 331                         public HandlerChain run() {
 332                             return serviceClass.getAnnotation(HandlerChain.class);
 333                         }
 334                     });
 335             if (handlerChain != null)
 336                 handlerConfigurator = new AnnotationConfigurator(this);
 337         }
 338 
 339     }
 340 
 341     /**
 342      * Parses the WSDL and builds {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLModel}.
 343      * @param wsdlDocumentLocation
 344      *      Either this or {@code wsdl} parameter must be given.
 345      *      Null location means the system won't be able to resolve relative references in the WSDL.
 346      */
 347     private WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
 348         try {
 349             return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(),
 350                 true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray());
 351         } catch (IOException e) {
 352             throw new WebServiceException(e);
 353         } catch (XMLStreamException e) {
 354             throw new WebServiceException(e);
 355         } catch (SAXException e) {
 356             throw new WebServiceException(e);
 357         } catch (ServiceConfigurationError e) {
 358             throw new WebServiceException(e);
 359         }
 360     }
 361 
 362     protected EntityResolver createCatalogResolver() {
 363         return createDefaultCatalogResolver();
 364     }
 365 


< prev index next >