List of usage examples for javax.xml.ws RespectBindingFeature isEnabled
public boolean isEnabled()
From source file:org.apache.axis2.jaxws.client.config.RespectBindingConfigurator.java
public void configure(MessageContext messageContext, BindingProvider provider) { if (log.isDebugEnabled()) { log.debug("Invoking RespectBindingConfiguration.configure() on client"); }/*from w w w. j a va 2s . c om*/ Binding bnd = (Binding) provider.getBinding(); RespectBindingFeature respectBindingFeature = (RespectBindingFeature) bnd .getFeature(RespectBindingFeature.ID); if (respectBindingFeature == null) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("respectBindingNotSpecified")); } boolean isEnabled = respectBindingFeature.isEnabled(); if (isEnabled) { if (bnd instanceof SOAPBinding) { ((SOAPBinding) bnd).setRespectBindingEnabled(isEnabled); } //Get the wsdl document location, if wsdl is not found throw a WebservicesException. //If wsdl is found, look for wsdl extensions. EndpointDescription endpointDescription = provider.getEndpointDescription(); endpointDescription.setRespectBinding(isEnabled); WSDLExtensionUtils.processExtensions(endpointDescription); //We have build up set of extensions from wsdl //let go ahead and validate these extensions now. EndpointDescriptionValidator endpointValidator = new EndpointDescriptionValidator(endpointDescription); boolean isEndpointValid = endpointValidator.validate(true); //throw Exception if extensions are not understood by Engine. if (!isEndpointValid) { String msg = Messages.getMessage("endpointDescriptionValidationErrors", endpointValidator.toString()); throw ExceptionFactory.makeWebServiceException(msg); } } if (log.isDebugEnabled()) { log.debug("Exit from RespectBindingConfiguration.configure() on client."); } }