com.sun.xml.internal.ws.binding.SOAPBindingImpl Java Examples
The following examples show how to use
com.sun.xml.internal.ws.binding.SOAPBindingImpl.
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: BindingID.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #2
Source File: BindingID.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #3
Source File: BindingID.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #4
Source File: BindingID.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #5
Source File: BindingID.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #6
Source File: BindingID.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #7
Source File: BindingID.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #8
Source File: BindingID.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Parses a binding ID string into a {@link BindingID} object. * * <p> * This method first checks for a few known values and then delegate * the parsing to {@link BindingIDFactory}. * * <p> * If parsing succeeds this method returns a value. Otherwise * throws {@link WebServiceException}. * * @throws WebServiceException * If the binding ID is not understood. */ public static @NotNull BindingID parse(String lexical) { if(lexical.equals(XML_HTTP.toString())) return XML_HTTP; if(lexical.equals(REST_HTTP.toString())) return REST_HTTP; if(belongsTo(lexical,SOAP11_HTTP.toString())) return customize(lexical,SOAP11_HTTP); if(belongsTo(lexical,SOAP12_HTTP.toString())) return customize(lexical,SOAP12_HTTP); if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING)) return customize(lexical,X_SOAP12_HTTP); // OK, it's none of the values JAX-WS understands. for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { BindingID r = f.parse(lexical); if(r!=null) return r; } // nobody understood this value throw new WebServiceException("Wrong binding ID: "+lexical); }
Example #9
Source File: ProviderInvokerTube.java From hottub with GNU General Public License v2.0 | 5 votes |
public static <T> ProviderInvokerTube<T> create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) { final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding); final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); }
Example #10
Source File: EndpointFactory.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */ private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException("can.not.generate.wsdl", bindingId); } if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) { String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL(); logger.warning(msg); } // Generate WSDL and schema documents using runtime model WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName()); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setWsdlResolver(wsdlResolver); wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); // wsdlGen.doGeneration(); return wsdlResolver.updateDocs(); }
Example #11
Source File: HeaderList.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) { Set<QName> notUnderstoodHeaders = null; if (roles == null) { roles = new HashSet<String>(); } SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding); roles.add(effectiveSoapVersion.implicitRole); for (int i = 0; i < size(); i++) { if (!isUnderstood(i)) { Header header = get(i); if (!header.isIgnorable(effectiveSoapVersion, roles)) { QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); if (binding == null) { //if binding is null, no further checks needed...we already //know this header is not understood from the isUnderstood //check above if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } else { // if the binding is not null, see if the binding can understand it if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) { if (!knownHeaders.contains(qName)) { //logger.info("Element not understood=" + qName); if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } } } } } } return notUnderstoodHeaders; }
Example #12
Source File: MUTube.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected MUTube(WSBinding binding, Tube next) { super(next); // MUPipe should n't be used for bindings other than SOAP. if (!(binding instanceof SOAPBinding)) { throw new WebServiceException( "MUPipe should n't be used for bindings other than SOAP."); } this.binding = (SOAPBindingImpl) binding; this.soapVersion = binding.getSOAPVersion(); }
Example #13
Source File: WsgenOptions.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public WsgenOptions() { protocols.add(SOAP11); protocols.add(X_SOAP12); nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class); for(WsgenExtension ext : extn) { Class clazz = ext.getClass(); WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); protocols.add(pro.token()); nonstdProtocols.put(pro.token(), pro.lexical()); } }
Example #14
Source File: MUTube.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected MUTube(WSBinding binding, Tube next) { super(next); // MUPipe should n't be used for bindings other than SOAP. if (!(binding instanceof SOAPBinding)) { throw new WebServiceException( "MUPipe should n't be used for bindings other than SOAP."); } this.binding = (SOAPBindingImpl) binding; this.soapVersion = binding.getSOAPVersion(); }
Example #15
Source File: EndpointFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */ private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException("can.not.generate.wsdl", bindingId); } if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) { String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL(); logger.warning(msg); } // Generate WSDL and schema documents using runtime model WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName()); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setWsdlResolver(wsdlResolver); wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); // wsdlGen.doGeneration(); return wsdlResolver.updateDocs(); }
Example #16
Source File: MUTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected MUTube(WSBinding binding, Tube next) { super(next); // MUPipe should n't be used for bindings other than SOAP. if (!(binding instanceof SOAPBinding)) { throw new WebServiceException( "MUPipe should n't be used for bindings other than SOAP."); } this.binding = (SOAPBindingImpl) binding; this.soapVersion = binding.getSOAPVersion(); }
Example #17
Source File: EndpointFactory.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */ private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException("can.not.generate.wsdl", bindingId); } if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) { String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL(); logger.warning(msg); } // Generate WSDL and schema documents using runtime model WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName()); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setWsdlResolver(wsdlResolver); wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); // wsdlGen.doGeneration(); return wsdlResolver.updateDocs(); }
Example #18
Source File: HeaderList.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) { Set<QName> notUnderstoodHeaders = null; if (roles == null) { roles = new HashSet<String>(); } SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding); roles.add(effectiveSoapVersion.implicitRole); for (int i = 0; i < size(); i++) { if (!isUnderstood(i)) { Header header = get(i); if (!header.isIgnorable(effectiveSoapVersion, roles)) { QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); if (binding == null) { //if binding is null, no further checks needed...we already //know this header is not understood from the isUnderstood //check above if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } else { // if the binding is not null, see if the binding can understand it if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) { if (!knownHeaders.contains(qName)) { //logger.info("Element not understood=" + qName); if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } } } } } } return notUnderstoodHeaders; }
Example #19
Source File: WsgenOptions.java From hottub with GNU General Public License v2.0 | 5 votes |
public WsgenOptions() { protocols.add(SOAP11); protocols.add(X_SOAP12); nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class); for(WsgenExtension ext : extn) { Class clazz = ext.getClass(); WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); protocols.add(pro.token()); nonstdProtocols.put(pro.token(), pro.lexical()); } }
Example #20
Source File: ProviderInvokerTube.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static <T> ProviderInvokerTube<T> create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) { final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding); final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); }
Example #21
Source File: WsgenOptions.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public WsgenOptions() { protocols.add(SOAP11); protocols.add(X_SOAP12); nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class); for(WsgenExtension ext : extn) { Class clazz = ext.getClass(); WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); protocols.add(pro.token()); nonstdProtocols.put(pro.token(), pro.lexical()); } }
Example #22
Source File: ProviderInvokerTube.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static <T> ProviderInvokerTube<T> create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) { final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding); final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); }
Example #23
Source File: HeaderList.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) { Set<QName> notUnderstoodHeaders = null; if (roles == null) { roles = new HashSet<String>(); } SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding); roles.add(effectiveSoapVersion.implicitRole); for (int i = 0; i < size(); i++) { if (!isUnderstood(i)) { Header header = get(i); if (!header.isIgnorable(effectiveSoapVersion, roles)) { QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); if (binding == null) { //if binding is null, no further checks needed...we already //know this header is not understood from the isUnderstood //check above if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } else { // if the binding is not null, see if the binding can understand it if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) { if (!knownHeaders.contains(qName)) { //logger.info("Element not understood=" + qName); if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } } } } } } return notUnderstoodHeaders; }
Example #24
Source File: MUTube.java From hottub with GNU General Public License v2.0 | 5 votes |
protected MUTube(WSBinding binding, Tube next) { super(next); // MUPipe should n't be used for bindings other than SOAP. if (!(binding instanceof SOAPBinding)) { throw new WebServiceException( "MUPipe should n't be used for bindings other than SOAP."); } this.binding = (SOAPBindingImpl) binding; this.soapVersion = binding.getSOAPVersion(); }
Example #25
Source File: WsgenOptions.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public WsgenOptions() { protocols.add(SOAP11); protocols.add(X_SOAP12); nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class); for(WsgenExtension ext : extn) { Class clazz = ext.getClass(); WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); protocols.add(pro.token()); nonstdProtocols.put(pro.token(), pro.lexical()); } }
Example #26
Source File: ProviderInvokerTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static <T> ProviderInvokerTube<T> create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) { final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding); final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); }
Example #27
Source File: EndpointFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */ private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, Collection<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException("can.not.generate.wsdl", bindingId); } if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) { String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL(); logger.warning(msg); } // Generate WSDL and schema documents using runtime model WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName()); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setWsdlResolver(wsdlResolver); wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); // wsdlGen.doGeneration(); return wsdlResolver.updateDocs(); }
Example #28
Source File: HeaderList.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) { Set<QName> notUnderstoodHeaders = null; if (roles == null) { roles = new HashSet<String>(); } SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding); roles.add(effectiveSoapVersion.implicitRole); for (int i = 0; i < size(); i++) { if (!isUnderstood(i)) { Header header = get(i); if (!header.isIgnorable(effectiveSoapVersion, roles)) { QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); if (binding == null) { //if binding is null, no further checks needed...we already //know this header is not understood from the isUnderstood //check above if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } else { // if the binding is not null, see if the binding can understand it if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) { if (!knownHeaders.contains(qName)) { //logger.info("Element not understood=" + qName); if (notUnderstoodHeaders == null) { notUnderstoodHeaders = new HashSet<QName>(); } notUnderstoodHeaders.add(qName); } } } } } } return notUnderstoodHeaders; }
Example #29
Source File: MUTube.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected MUTube(WSBinding binding, Tube next) { super(next); // MUPipe should n't be used for bindings other than SOAP. if (!(binding instanceof SOAPBinding)) { throw new WebServiceException( "MUPipe should n't be used for bindings other than SOAP."); } this.binding = (SOAPBindingImpl) binding; this.soapVersion = binding.getSOAPVersion(); }
Example #30
Source File: WsgenOptions.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public WsgenOptions() { protocols.add(SOAP11); protocols.add(X_SOAP12); nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class); for(WsgenExtension ext : extn) { Class clazz = ext.getClass(); WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); protocols.add(pro.token()); nonstdProtocols.put(pro.token(), pro.lexical()); } }