Author: gawor
Date: Wed Aug 22 09:08:59 2007
New Revision: 568674
URL: http://svn.apache.org/viewvc?rev=568674&view=rev
Log:
if generic Service class is specified and without wsdl, the service reference must be created
with a dummy service qname (GERONIMO-3435)
Modified:
geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java?rev=568674&r1=568673&r2=568674&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
Wed Aug 22 09:08:59 2007
@@ -100,17 +100,27 @@
public void build() throws DeploymentException {
if (this.wsdlURI == null) {
- // wsdl explitely not specified, try to get it from
- // the service class annotation
- WebServiceClient webServiceClient =
- (WebServiceClient) this.serviceClass.getAnnotation(WebServiceClient.class);
- if (webServiceClient != null) {
- this.wsdlURI = getWSDLLocation(webServiceClient);
- this.serviceQName = getServiceQName(webServiceClient);
- }
-
- if (this.wsdlURI == null) {
+ // wsdl was not explicitly specified
+ if (javax.xml.ws.Service.class.equals(this.serviceClass)) {
+ // Generic Service class specified.
+ // Service API requires a service qname so create a dummy one
+ this.serviceQName = new QName("http://noservice", "noservice");
return;
+ } else {
+ // Generated Service class specified.
+ // Get the wsdl and service qname from the WebServiceClient annotation
+ // of the generated Service class
+ WebServiceClient webServiceClient =
+ (WebServiceClient) this.serviceClass.getAnnotation(WebServiceClient.class);
+ if (webServiceClient != null) {
+ this.wsdlURI = getWSDLLocation(webServiceClient);
+ this.serviceQName = getServiceQName(webServiceClient);
+ }
+
+ // wsdl really shouldn't be null at this point
+ if (this.wsdlURI == null) {
+ return;
+ }
}
}
|