nicer error message indicating JAX-WS 2.1 requirement at runtime (SPR-8998)
This commit is contained in:
parent
b91e989ad4
commit
96b8c46480
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -407,8 +407,14 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory
|
|||
*/
|
||||
protected Object getPortStub(Service service, QName portQName) {
|
||||
if (this.webServiceFeatures != null) {
|
||||
try {
|
||||
return new FeaturePortProvider().getPortStub(service, portQName, this.webServiceFeatures);
|
||||
}
|
||||
catch (LinkageError ex) {
|
||||
throw new IllegalStateException(
|
||||
"Specifying the 'webServiceFeatures' property requires JAX-WS 2.1 or higher at runtime", ex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return (portQName != null ? service.getPort(portQName, getServiceInterface()) :
|
||||
service.getPort(getServiceInterface()));
|
||||
|
|
@ -527,6 +533,7 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Inner class in order to avoid a hard-coded JAX-WS 2.1 dependency.
|
||||
* JAX-WS 2.0, as used in Java EE 5, didn't have WebServiceFeatures yet...
|
||||
|
|
|
|||
Loading…
Reference in New Issue