List of usage examples for javax.xml.registry InvalidRequestException InvalidRequestException
public InvalidRequestException(String reason, Throwable cause)
JAXRException
object with the given String
as the reason for the exception being thrown and the given Throwable
object as an embedded Throwable. From source file:org.apache.ws.scout.registry.RegistryImpl.java
/** * @throws InvalidRequestException // ww w . j a va2 s . c o m * */ private void init(Properties props) throws InvalidRequestException { // We need to have a non-null Properties // instance so initialization takes place. if (props == null) props = new Properties(); // Override defaults with specific specific values try { setInquiryURI(new URI(props.getProperty(ConnectionFactoryImpl.QUERYMANAGER_PROPERTY))); if (props.containsKey(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY)) { setPublishURI(new URI(props.getProperty(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY))); } String securityURL = props.getProperty(ConnectionFactoryImpl.SECURITYMANAGER_PROPERTY, props.getProperty(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY)); if (securityURL != null) setSecurityURI(new URI(securityURL)); setAdminURI(new URI( props.getProperty(ConnectionFactoryImpl.ADMIN_ENDPOINT_PROPERTY, DEFAULT_ADMIN_ENDPOINT))); setSecurityProvider( props.getProperty(ConnectionFactoryImpl.SECURITY_PROVIDER_PROPERTY, DEFAULT_SECURITY_PROVIDER)); setProtocolHandler( props.getProperty(ConnectionFactoryImpl.PROTOCOL_HANDLER_PROPERTY, DEFAULT_PROTOCOL_HANDLER)); setUddiVersion(props.getProperty(ConnectionFactoryImpl.UDDI_VERSION_PROPERTY, DEFAULT_UDDI_VERSION)); setUddiNamespace( props.getProperty(ConnectionFactoryImpl.UDDI_NAMESPACE_PROPERTY, DEFAULT_UDDI_NAMESPACE)); setTransport(getTransport( props.getProperty(ConnectionFactoryImpl.TRANSPORT_CLASS_PROPERTY, DEFAULT_TRANSPORT_CLASS))); JAXBContext context = JAXBContextUtil.getContext(JAXBContextUtil.UDDI_V2_VERSION); unmarshaller = context.createUnmarshaller(); marshaller = context.createMarshaller(); } catch (URISyntaxException muex) { throw new InvalidRequestException(muex.getMessage(), muex); } catch (JAXBException e) { throw new RuntimeException(e); } }
From source file:org.apache.ws.scout.registry.RegistryV3Impl.java
/** * @throws InvalidRequestException /*from www . j av a 2 s. c om*/ * */ private void init(Properties props, String nodeName, String managerName) throws InvalidRequestException { this.nodeName = nodeName; this.managerName = managerName; // We need to have a non-null Properties // instance so initialization takes place. if (props == null) props = new Properties(); // Override defaults with specific specific values try { // note that since we are using the juddi-client, these settings are fixed! // the URL settings will be passed down to the juddi-client config. // (see the parameters in the "META-INF/jaxr-uddi.xml) setInquiryURI(new URI(DEFAULT_INQUIRY_ENDPOINT)); setPublishURI(new URI(DEFAULT_PUBLISH_ENDPOINT)); setSecurityURI(new URI(DEFAULT_SECURITY_ENDPOINT)); setTransport(getTransport(DEFAULT_TRANSPORT_CLASS)); // the following parameters are still configurable however setAdminURI(new URI( props.getProperty(ConnectionFactoryImpl.ADMIN_ENDPOINT_PROPERTY, DEFAULT_ADMIN_ENDPOINT))); setSecurityProvider( props.getProperty(ConnectionFactoryImpl.SECURITY_PROVIDER_PROPERTY, DEFAULT_SECURITY_PROVIDER)); setProtocolHandler( props.getProperty(ConnectionFactoryImpl.PROTOCOL_HANDLER_PROPERTY, DEFAULT_PROTOCOL_HANDLER)); setUddiVersion(props.getProperty(ConnectionFactoryImpl.UDDI_VERSION_PROPERTY, DEFAULT_UDDI_VERSION)); setUddiNamespace( props.getProperty(ConnectionFactoryImpl.UDDI_NAMESPACE_PROPERTY, DEFAULT_UDDI_NAMESPACE)); JAXBContext context = JAXBContextUtil.getContext(JAXBContextUtil.UDDI_V3_VERSION); unmarshaller = context.createUnmarshaller(); marshaller = context.createMarshaller(); } catch (URISyntaxException muex) { throw new InvalidRequestException(muex.getMessage(), muex); } catch (JAXBException e) { throw new RuntimeException(e); } }