javax.xml.ws.spi.Provider Java Examples
The following examples show how to use
javax.xml.ws.spi.Provider.
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: JaxWsProviderWrapperTest.java From tomee with Apache License 2.0 | 6 votes |
public void test() throws Exception { System.setProperty(Provider.class.getName(), MockProvider.class.getName()); Provider provider = Provider.provider(); assertNotNull("provider is null", provider); assertFalse("provider should not be an instance of ProviderWrapper", provider instanceof JaxWsProviderWrapper); JaxWsProviderWrapper.beforeCreate(null); try { provider = Provider.provider(); assertNotNull("provider is null", provider); assertTrue("provider should be an instance of ProviderWrapper", provider instanceof JaxWsProviderWrapper); final JaxWsProviderWrapper providerWrapper = (JaxWsProviderWrapper) provider; // check delegate final Provider delegate = providerWrapper.getDelegate(); assertNotNull("providerWrapper delegate is null", delegate); assertFalse("providerWrapper delegate should not be an instance of ProviderWrapper", delegate instanceof JaxWsProviderWrapper); } finally { JaxWsProviderWrapper.afterCreate(); } }
Example #2
Source File: ProviderWrapperTest.java From tomee with Apache License 2.0 | 6 votes |
public void test() throws Exception { System.setProperty(Provider.class.getName(), MockProvider.class.getName()); Provider provider = Provider.provider(); assertNotNull("provider is null", provider); assertFalse("provider should not be an instance of ProviderWrapper", provider instanceof ProviderWrapper); ProviderWrapper.beforeCreate(null, null, null); try { provider = Provider.provider(); assertNotNull("provider is null", provider); assertTrue("provider should be an instance of ProviderWrapper", provider instanceof ProviderWrapper); final ProviderWrapper providerWrapper = (ProviderWrapper) provider; // check delegate final Provider delegate = providerWrapper.getDelegate(); assertNotNull("providerWrapper delegate is null", delegate); assertFalse("providerWrapper delegate should not be an instance of ProviderWrapper", delegate instanceof ProviderWrapper); } finally { ProviderWrapper.afterCreate(); } }
Example #3
Source File: WSNHelper.java From cxf with Apache License 2.0 | 5 votes |
private static synchronized void createInstance() { if (instance != null) { return; } Provider p = Provider.provider(); if (p.getClass().getName().contains("apache.cxf")) { instance = new CXFWSNHelper(); } else { instance = new WSNHelper(); } }
Example #4
Source File: JaxWsProviderWrapper.java From tomee with Apache License 2.0 | 5 votes |
private static Provider createProviderInstance(final String providerClass, final ClassLoader classLoader) { if (providerClass != null && providerClass.length() > 0 && !providerClass.equals(JaxWsProviderWrapper.class.getName())) { try { final Class<? extends Provider> clazz = classLoader.loadClass(providerClass).asSubclass(Provider.class); return clazz.newInstance(); } catch (Throwable e) { logger.log(Level.WARNING, "Unable to construct provider implementation " + providerClass, e); } } return null; }
Example #5
Source File: ProviderWrapper.java From tomee with Apache License 2.0 | 5 votes |
private static Provider createProviderInstance(final String providerClass, final ClassLoader classLoader) { if (providerClass != null && providerClass.length() > 0 && !providerClass.equals(ProviderWrapper.class.getName())) { try { final Class<? extends Provider> clazz = classLoader.loadClass(providerClass).asSubclass(Provider.class); return clazz.newInstance(); } catch (final Throwable e) { logger.warning("Unable to construct provider implementation " + providerClass, e); } } return null; }
Example #6
Source File: Service.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #7
Source File: Service.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #8
Source File: Service.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #9
Source File: Service.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #10
Source File: Service.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #11
Source File: Service.java From Java8CN with Apache License 2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #12
Source File: Service.java From JDKSourceCode1.8 with MIT License | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #13
Source File: Service.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #14
Source File: ProviderWrapper.java From tomee with Apache License 2.0 | 4 votes |
public Provider getDelegate() { return delegate; }
Example #15
Source File: Service.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #16
Source File: JaxwsEndpointManager.java From cxf with Apache License 2.0 | 4 votes |
private boolean isCXF() { return Provider.provider().getClass().getName().contains(".cxf"); }
Example #17
Source File: Service.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #18
Source File: Service.java From JDKSourceCode1.8 with MIT License | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #19
Source File: JaxWsProviderWrapper.java From tomee with Apache License 2.0 | 4 votes |
public Provider getDelegate() { return delegate; }
Example #20
Source File: Service.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #21
Source File: Service.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass(), features); }
Example #22
Source File: Service.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); }
Example #23
Source File: W3CEndpointReferenceBuilder.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #24
Source File: W3CEndpointReferenceBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #25
Source File: W3CEndpointReferenceBuilder.java From Java8CN with Apache License 2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #26
Source File: W3CEndpointReferenceBuilder.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #27
Source File: W3CEndpointReferenceBuilder.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #28
Source File: W3CEndpointReferenceBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #29
Source File: W3CEndpointReferenceBuilder.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Builds a <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. * <p> * This method can be used to create a <code>W3CEndpointReference</code> * for any endpoint by specifying the <code>address</code> property along * with any other desired properties. This method * can also be used to create a <code>W3CEndpointReference</code> for * an endpoint that is published by the same Java EE application. * This method can automatically determine the <code>address</code> of * an endpoint published by the same Java EE application that is identified by the * <code>serviceName</code> and * <code>endpointName</code> properties. If the <code>address</code> is * <code>null</code> and the <code>serviceName</code> and * <code>endpointName</code> * do not identify an endpoint published by the same Java EE application, a * <code>java.lang.IllegalStateException</code> MUST be thrown. * * * @return <code>W3CEndpointReference</code> from the accumulated * properties set on this <code>W3CEndpointReferenceBuilder</code> * instance. This method never returns <code>null</code>. * * @throws IllegalStateException * <ul> * <li>If the <code>address</code>, <code>serviceName</code> and * <code>endpointName</code> are all <code>null</code>. * <li>If the <code>serviceName</code> service is <code>null</code> and the * <code>endpointName</code> is NOT <code>null</code>. * <li>If the <code>address</code> property is <code>null</code> and * the <code>serviceName</code> and <code>endpointName</code> do not * specify a valid endpoint published by the same Java EE * application. * <li>If the <code>serviceName</code> is NOT <code>null</code> * and is not present in the specified WSDL. * <li>If the <code>endpointName</code> port is not <code>null</code> and it * is not present in <code>serviceName</code> service in the WSDL. * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * <code>W3CEndpointReference</code>. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }
Example #30
Source File: W3CEndpointReferenceBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Builds a {@code W3CEndpointReference} from the accumulated * properties set on this {@code W3CEndpointReferenceBuilder} * instance. * <p> * This method can be used to create a {@code W3CEndpointReference} * for any endpoint by specifying the {@code address} property along * with any other desired properties. This method * can also be used to create a {@code W3CEndpointReference} for * an endpoint that is published by the same Java EE application. * This method can automatically determine the {@code address} of * an endpoint published by the same Java EE application that is identified by the * {@code serviceName} and * {@code endpointName} properties. If the {@code address} is * {@code null} and the {@code serviceName} and * {@code endpointName} * do not identify an endpoint published by the same Java EE application, a * {@code java.lang.IllegalStateException} MUST be thrown. * * * @return {@code W3CEndpointReference} from the accumulated * properties set on this {@code W3CEndpointReferenceBuilder} * instance. This method never returns {@code null}. * * @throws IllegalStateException * <ul> * <li>If the {@code address}, {@code serviceName} and * {@code endpointName} are all {@code null}. * <li>If the {@code serviceName} service is {@code null} and the * {@code endpointName} is NOT {@code null}. * <li>If the {@code address} property is {@code null} and * the {@code serviceName} and {@code endpointName} do not * specify a valid endpoint published by the same Java EE * application. * <li>If the {@code serviceName} is NOT {@code null} * and is not present in the specified WSDL. * <li>If the {@code endpointName} port is not {@code null} and it * is not present in {@code serviceName} service in the WSDL. * <li>If the {@code wsdlDocumentLocation} is NOT {@code null} * and does not represent a valid WSDL. * </ul> * @throws WebServiceException If an error occurs while creating the * {@code W3CEndpointReference}. * */ public W3CEndpointReference build() { if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) { // 2.1 API return Provider.provider().createW3CEndpointReference(address, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters); } return Provider.provider().createW3CEndpointReference(address, interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation, referenceParameters, elements, attributes); }