com.sun.xml.internal.ws.api.model.wsdl.WSDLModel Java Examples
The following examples show how to use
com.sun.xml.internal.ws.api.model.wsdl.WSDLModel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RuntimeWSDLParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or {@code wsdl} parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #2
Source File: RuntimeWSDLParser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #3
Source File: PolicyUtil.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #4
Source File: PolicyUtil.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #5
Source File: RuntimeWSDLParser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #6
Source File: RuntimeWSDLParser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #7
Source File: RuntimeWSDLParser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #8
Source File: RuntimeWSDLParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #9
Source File: RuntimeWSDLParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #10
Source File: RuntimeWSDLParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #11
Source File: PolicyUtil.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #12
Source File: RuntimeWSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #13
Source File: RuntimeWSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #14
Source File: RuntimeWSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #15
Source File: PolicyUtil.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #16
Source File: PolicyUtil.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #17
Source File: RuntimeWSDLParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #18
Source File: RuntimeWSDLParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #19
Source File: PolicyUtil.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #20
Source File: RuntimeWSDLParser.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #21
Source File: RuntimeWSDLParser.java From hottub with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #22
Source File: RuntimeWSDLParser.java From hottub with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #23
Source File: PolicyUtil.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #24
Source File: RuntimeWSDLParser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #25
Source File: RuntimeWSDLParser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #26
Source File: RuntimeWSDLParser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #27
Source File: PolicyUtil.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Iterates through the ports in the WSDL model, for each policy in the policy * map that is attached at endpoint scope computes a list of corresponding * WebServiceFeatures and sets them on the port. * * @param model The WSDL model * @param policyMap The policy map * @throws PolicyException If the list of WebServiceFeatures could not be computed */ public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException { LOGGER.entering(model, policyMap); for (WSDLService service : model.getServices().values()) { for (WSDLPort port : service.getPorts()) { final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName()); for (WebServiceFeature feature : features) { port.addFeature(feature); port.getBinding().addFeature(feature); } } } LOGGER.exiting(); }
Example #28
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'. * * @param wsdlLoc * Either this or <tt>wsdl</tt> parameter must be given. * Null location means the system won't be able to resolve relative references in the WSDL, */ public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, @NotNull PolicyResolver policyResolver, boolean isUseStreamFromEntityResolverWrapper, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions); Parser parser; try{ parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass); if(!hasWSDLDefinitions(parser.parser)){ throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId, WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation())); } }catch(XMLStreamException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); }catch(IOException e){ //Try MEX if there is WSDLLoc available if(wsdlLoc == null) throw e; return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions); } wsdlParser.extensionFacade.start(wsdlParser.context); wsdlParser.parseWSDL(parser, false); wsdlParser.wsdlDoc.freeze(); wsdlParser.extensionFacade.finished(wsdlParser.context); wsdlParser.extensionFacade.postFinished(wsdlParser.context); if(wsdlParser.wsdlDoc.getServices().isEmpty()) throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc)); return wsdlParser.wsdlDoc; }
Example #29
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #30
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }