Java Code Examples for javax.jws.WebService#portName()

The following examples show how to use javax.jws.WebService#portName() . 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: JaxWsPortClientInterceptor.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * Initialize this client interceptor's properties from the given WebService annotation,
 * if necessary and possible (i.e. if "wsdlDocumentUrl", "namespaceUri", "serviceName"
 * and "portName" haven't been set but corresponding values are declared at the
 * annotation level of the specified service interface).
 * @param ann the WebService annotation found on the specified service interface
 */
protected void applyDefaultsFromAnnotation(WebService ann) {
	if (getWsdlDocumentUrl() == null) {
		String wsdl = ann.wsdlLocation();
		if (StringUtils.hasText(wsdl)) {
			try {
				setWsdlDocumentUrl(new URL(wsdl));
			}
			catch (MalformedURLException ex) {
				throw new IllegalStateException(
						"Encountered invalid @Service wsdlLocation value [" + wsdl + "]", ex);
			}
		}
	}
	if (getNamespaceUri() == null) {
		String ns = ann.targetNamespace();
		if (StringUtils.hasText(ns)) {
			setNamespaceUri(ns);
		}
	}
	if (getServiceName() == null) {
		String sn = ann.serviceName();
		if (StringUtils.hasText(sn)) {
			setServiceName(sn);
		}
	}
	if (getPortName() == null) {
		String pn = ann.portName();
		if (StringUtils.hasText(pn)) {
			setPortName(pn);
		}
	}
}
 
Example 2
Source File: JaxWsPortClientInterceptor.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * Initialize this client interceptor's properties from the given WebService annotation,
 * if necessary and possible (i.e. if "wsdlDocumentUrl", "namespaceUri", "serviceName"
 * and "portName" haven't been set but corresponding values are declared at the
 * annotation level of the specified service interface).
 * @param ann the WebService annotation found on the specified service interface
 */
protected void applyDefaultsFromAnnotation(WebService ann) {
	if (getWsdlDocumentUrl() == null) {
		String wsdl = ann.wsdlLocation();
		if (StringUtils.hasText(wsdl)) {
			try {
				setWsdlDocumentUrl(new URL(wsdl));
			}
			catch (MalformedURLException ex) {
				throw new IllegalStateException(
						"Encountered invalid @Service wsdlLocation value [" + wsdl + "]", ex);
			}
		}
	}
	if (getNamespaceUri() == null) {
		String ns = ann.targetNamespace();
		if (StringUtils.hasText(ns)) {
			setNamespaceUri(ns);
		}
	}
	if (getServiceName() == null) {
		String sn = ann.serviceName();
		if (StringUtils.hasText(sn)) {
			setServiceName(sn);
		}
	}
	if (getPortName() == null) {
		String pn = ann.portName();
		if (StringUtils.hasText(pn)) {
			setPortName(pn);
		}
	}
}
 
Example 3
Source File: JaxWsPortClientInterceptor.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initialize this client interceptor's properties from the given WebService annotation,
 * if necessary and possible (i.e. if "wsdlDocumentUrl", "namespaceUri", "serviceName"
 * and "portName" haven't been set but corresponding values are declared at the
 * annotation level of the specified service interface).
 * @param ann the WebService annotation found on the specified service interface
 */
protected void applyDefaultsFromAnnotation(WebService ann) {
	if (getWsdlDocumentUrl() == null) {
		String wsdl = ann.wsdlLocation();
		if (StringUtils.hasText(wsdl)) {
			try {
				setWsdlDocumentUrl(new URL(wsdl));
			}
			catch (MalformedURLException ex) {
				throw new IllegalStateException(
						"Encountered invalid @Service wsdlLocation value [" + wsdl + "]", ex);
			}
		}
	}
	if (getNamespaceUri() == null) {
		String ns = ann.targetNamespace();
		if (StringUtils.hasText(ns)) {
			setNamespaceUri(ns);
		}
	}
	if (getServiceName() == null) {
		String sn = ann.serviceName();
		if (StringUtils.hasText(sn)) {
			setServiceName(sn);
		}
	}
	if (getPortName() == null) {
		String pn = ann.portName();
		if (StringUtils.hasText(pn)) {
			setPortName(pn);
		}
	}
}
 
Example 4
Source File: JaxWsPortClientInterceptor.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize this client interceptor's properties from the given WebService annotation,
 * if necessary and possible (i.e. if "wsdlDocumentUrl", "namespaceUri", "serviceName"
 * and "portName" haven't been set but corresponding values are declared at the
 * annotation level of the specified service interface).
 * @param ann the WebService annotation found on the specified service interface
 */
protected void applyDefaultsFromAnnotation(WebService ann) {
	if (getWsdlDocumentUrl() == null) {
		String wsdl = ann.wsdlLocation();
		if (StringUtils.hasText(wsdl)) {
			try {
				setWsdlDocumentUrl(new URL(wsdl));
			}
			catch (MalformedURLException ex) {
				throw new IllegalStateException(
						"Encountered invalid @Service wsdlLocation value [" + wsdl + "]", ex);
			}
		}
	}
	if (getNamespaceUri() == null) {
		String ns = ann.targetNamespace();
		if (StringUtils.hasText(ns)) {
			setNamespaceUri(ns);
		}
	}
	if (getServiceName() == null) {
		String sn = ann.serviceName();
		if (StringUtils.hasText(sn)) {
			setServiceName(sn);
		}
	}
	if (getPortName() == null) {
		String pn = ann.portName();
		if (StringUtils.hasText(pn)) {
			setPortName(pn);
		}
	}
}