You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ba...@apache.org on 2006/11/03 02:33:03 UTC
svn commit: r470629 [2/8] - in /webservices/axis2/trunk/java/modules/jaxws:
src/javax/xml/ws/spi/ src/org/apache/axis2/jaxws/
src/org/apache/axis2/jaxws/client/proxy/
src/org/apache/axis2/jaxws/context/utils/
src/org/apache/axis2/jaxws/description/ src...
Copied: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionImpl.java (from r470019, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionImpl.java?view=diff&rev=470629&p1=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java&r1=470019&p2=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionImpl.java&r2=470629
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionImpl.java Thu Nov 2 17:33:00 2006
@@ -90,9 +90,9 @@
* fixed, that will probably have an impact on this class. In particular, I think this should be created
* somehow from an AxisService/AxisPort combination, and not directly from the WSDL.
*/
-public class EndpointDescription {
+class EndpointDescriptionImpl implements EndpointDescription, EndpointDescriptionJava, EndpointDescriptionWSDL {
- private ServiceDescription parentServiceDescription;
+ private ServiceDescriptionImpl parentServiceDescription;
private AxisService axisService;
private QName portQName;
@@ -118,8 +118,7 @@
//This is the base WebService or WebServiceProvider that we are processing
DescriptionBuilderComposite composite = null;
- public static final String AXIS_SERVICE_PARAMETER = "org.apache.axis2.jaxws.description.EndpointDescription";
- private static final Log log = LogFactory.getLog(EndpointDescription.class);
+ private static final Log log = LogFactory.getLog(EndpointDescriptionImpl.class);
// ===========================================
@@ -170,10 +169,10 @@
* @param theClass The SEI or Impl class. This will be NULL for Dispatch clients
* since they don't use an SEI
*/
- public EndpointDescription(Class theClass, QName portName, ServiceDescription parent) {
+ public EndpointDescriptionImpl(Class theClass, QName portName, ServiceDescriptionImpl parent) {
this(theClass, portName, false, parent);
}
- public EndpointDescription(Class theClass, QName portName, boolean dynamicPort, ServiceDescription parent) {
+ public EndpointDescriptionImpl(Class theClass, QName portName, boolean dynamicPort, ServiceDescriptionImpl parent) {
// TODO: This and the other constructor will (eventually) take the same args, so the logic needs to be combined
// TODO: If there is WSDL, could compare the namespace of the defn against the portQName.namespace
this.parentServiceDescription = parent;
@@ -191,7 +190,7 @@
getServiceClient();
// Give the configuration builder a chance to finalize configuration for this service
try {
- getServiceDescription().getClientConfigurationFactory().completeAxis2Configuration(axisService);
+ getServiceDescriptionImpl().getClientConfigurationFactory().completeAxis2Configuration(axisService);
} catch (DeploymentException e) {
// TODO RAS
// TODO NLS
@@ -220,7 +219,7 @@
* @param theClass The SEI or Impl class. This will be NULL for Dispatch clients
* since they don't use an SEI
*/
- public EndpointDescription(ServiceDescription parent, String serviceImplName) {
+ public EndpointDescriptionImpl(ServiceDescriptionImpl parent, String serviceImplName) {
// TODO: This and the other constructor will (eventually) take the same args, so the logic needs to be combined
// TODO: If there is WSDL, could compare the namespace of the defn against the portQName.namespace
@@ -228,7 +227,7 @@
this.serviceImplName = serviceImplName;
this.implOrSEIClass = null;
- composite = getServiceDescription().getDescriptionBuilderComposite();
+ composite = getServiceDescriptionImpl().getDescriptionBuilderComposite();
if (composite == null){
throw ExceptionFactory.makeWebServiceException("EndpointDescription.EndpointDescription: parents DBC is null");
}
@@ -297,8 +296,7 @@
* @param portName May be null; if so the annotation is used
* @param parent
*/
- // TODO: Remove axisService as paramater when the AxisService can be constructed from the annotations
- EndpointDescription(Class theClass, QName portName, AxisService axisService, ServiceDescription parent) {
+ EndpointDescriptionImpl(Class theClass, QName portName, AxisService axisService, ServiceDescriptionImpl parent) {
this.parentServiceDescription = parent;
this.portQName = portName;
this.implOrSEIClass = theClass;
@@ -317,7 +315,7 @@
// Add a reference to this EndpointDescription object to the AxisService
if (axisService != null) {
Parameter parameter = new Parameter();
- parameter.setName(AXIS_SERVICE_PARAMETER);
+ parameter.setName(EndpointDescription.AXIS_SERVICE_PARAMETER);
parameter.setValue(this);
// TODO: What to do if AxisFault
try {
@@ -352,7 +350,7 @@
// TODO: Add tests to verify this error checking
- if (!getServiceDescription().isDBCMap()) {
+ if (!getServiceDescriptionImpl().isDBCMap()) {
webServiceAnnotation = (WebService) implOrSEIClass.getAnnotation(WebService.class);
webServiceProviderAnnotation = (WebServiceProvider) implOrSEIClass.getAnnotation(WebServiceProvider.class);
@@ -378,9 +376,9 @@
// If this impl class references an SEI, then use that SEI to create the EndpointInterfaceDesc.
// TODO: Add support for service impl endpoints that don't reference an SEI; remember
// that this is also called with just an SEI interface from svcDesc.updateWithSEI()
- String seiClassName = getWebServiceEndpointInterface();
+ String seiClassName = getAnnoWebServiceEndpointInterface();
- if (!getServiceDescription().isDBCMap()){
+ if (!getServiceDescriptionImpl().isDBCMap()){
Class seiClass = null;
if (DescriptionUtils.isEmpty(seiClassName)) {
// For now, just build the EndpointInterfaceDesc based on the class itself.
@@ -398,20 +396,20 @@
throw new UnsupportedOperationException("Can't create SEI class: " + e);
}
}
- endpointInterfaceDescription = new EndpointInterfaceDescription(seiClass, this);
+ endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(seiClass, this);
} else {
//TODO: Determine if we need logic here to determine implied SEI or not. This logic
// may be handled by EndpointInterfaceDescription
- if (DescriptionUtils.isEmpty(getWebServiceEndpointInterface())) {
+ if (DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface())) {
//TODO: Build the EndpointInterfaceDesc based on the class itself
- endpointInterfaceDescription = new EndpointInterfaceDescription(composite, true, this);
+ endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(composite, true, this);
} else {
//Otherwise, build the EID based on the SEI composite
- endpointInterfaceDescription = new EndpointInterfaceDescription(
- getServiceDescription().getDBCMap().get(seiClassName),
+ endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(
+ getServiceDescriptionImpl().getDBCMap().get(seiClassName),
false,
this);
}
@@ -422,11 +420,12 @@
}
public QName getPortQName() {
+ // TODO: (JLB) Implement WSDL/Annotation merge
if (portQName == null) {
// The name was not set by the constructors, so get it from the
// appropriate annotation.
- String name = getWebServicePortName();
- String tns = getWebServiceTargetNamespace();
+ String name = getAnnoWebServicePortName();
+ String tns = getAnnoWebServiceTargetNamespace();
// TODO: Check for name &/| tns null or empty string and add tests for same
portQName = new QName(tns, name);
@@ -438,6 +437,10 @@
return parentServiceDescription;
}
+ ServiceDescriptionImpl getServiceDescriptionImpl() {
+ return (ServiceDescriptionImpl) parentServiceDescription;
+ }
+
public EndpointInterfaceDescription getEndpointInterfaceDescription() {
return endpointInterfaceDescription;
}
@@ -446,11 +449,11 @@
return axisService;
}
- public boolean isDynamicPort() {
+ boolean isDynamicPort() {
return isDynamicPort;
}
- public void updateWithSEI(Class sei) {
+ void updateWithSEI(Class sei) {
// Updating with an SEI is only valid for declared ports; it is not valid for dynamic ports.
if (isDynamicPort()) {
// TODO: RAS and NLS
@@ -464,14 +467,14 @@
if (endpointInterfaceDescription != null) {
// The EndpointInterfaceDescription was created previously based on the port declaration (i.e. WSDL)
// so update that with information from the SEI annotations
- endpointInterfaceDescription.updateWithSEI(sei);
+ ((EndpointInterfaceDescriptionImpl) endpointInterfaceDescription).updateWithSEI(sei);
}
else {
// An EndpointInterfaceDescription does not exist yet. This currently happens in the case where there is
// NO WSDL provided and a Dispatch client is created for prior to a getPort being done for that port.
// There was no WSDL to create the EndpointInterfaceDescription from and there was no annotated SEI to
// use at that time. Now we have an annotated SEI, so create the EndpointInterfaceDescription now.
- endpointInterfaceDescription = new EndpointInterfaceDescription(sei, this);
+ endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(sei, this);
}
return;
}
@@ -481,7 +484,7 @@
// WSDL to build up the AxisService since the port added to the Service by the client is not
// one that will be present in the WSDL. A null class passed in as the SEI indicates this
// is a dispatch client.
- if (!isDynamicPort && getServiceDescription().getWSDLWrapper() != null) {
+ if (!isDynamicPort && getServiceDescriptionImpl().getWSDLWrapper() != null) {
buildAxisServiceFromWSDL();
}
else {
@@ -525,7 +528,7 @@
// one that will be present in the WSDL. A null class passed in as the SEI indicates this
// is a dispatch client.
- if (getServiceDescription().getWSDLWrapper() != null) {
+ if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
buildAxisServiceFromWSDL();
}
else {
@@ -541,7 +544,7 @@
//Save the Port Type name
Parameter portTypeNameParameter = new Parameter();
portTypeNameParameter.setName(MDQConstants.WSDL_PORTTYPE_NAME);
- portTypeNameParameter.setValue(getWebServiceName());
+ portTypeNameParameter.setValue(getAnnoWebServiceName());
// Save the Service QName as a parameter.
Parameter serviceNameParameter = new Parameter();
@@ -560,15 +563,15 @@
//TODO: At some point this should always return a valid WSDL definition, for now just
// make sure we don't get an NPE
- if (getServiceDescription().getWSDLWrapper() != null)
- wsdlDefParameter.setValue(getServiceDescription().getWSDLWrapper().getDefinition());
+ if (getServiceDescriptionImpl().getWSDLWrapper() != null)
+ wsdlDefParameter.setValue(getServiceDescriptionImpl().getWSDLWrapper().getDefinition());
else
- wsdlDefParameter.setValue(getServiceDescription().getWSDLWrapper());
+ wsdlDefParameter.setValue(getServiceDescriptionImpl().getWSDLWrapper());
//Save the WSDL Location
Parameter wsdlLocationParameter = new Parameter();
wsdlDefParameter.setName(MDQConstants.WSDL_LOCATION);
- wsdlDefParameter.setValue(getWebServiceWSDLLocation());
+ wsdlDefParameter.setValue(getAnnoWebServiceWSDLLocation());
//Save the fully qualified class name for the serviceImpl
Parameter serviceClassNameParameter = new Parameter();
@@ -597,14 +600,14 @@
// Note that the axis service builder takes only the localpart of the port qname.
// TODO:: This should check that the namespace of the definition matches the namespace of the portQName per JAXRPC spec
WSDL11ToAxisServiceBuilder serviceBuilder =
- new WSDL11ToAxisServiceBuilder( getServiceDescription().getWSDLWrapper().getDefinition(),
+ new WSDL11ToAxisServiceBuilder( getServiceDescriptionImpl().getWSDLWrapper().getDefinition(),
getServiceDescription().getServiceQName(),
getPortQName().getLocalPart());
// TODO: Currently this only builds the client-side AxisService;
// it needs to do client and server somehow.
// Patterned after AxisService.createClientSideAxisService
- if (getServiceDescription().isServerSide())
+ if (getServiceDescriptionImpl().isServerSide())
serviceBuilder.setServerSide(true);
else
serviceBuilder.setServerSide(false);
@@ -642,15 +645,15 @@
//First, check to see if we can build this with the DBC List
//TODO: When MDQ input is the only possible input, then we can remove the check for
// the DBC list, until that time the code in here may appear somewhat redundant
- if (getServiceDescription().isDBCMap()) {
- if (!isDynamicPort && getServiceDescription().getWSDLWrapper() != null)
+ if (getServiceDescriptionImpl().isDBCMap()) {
+ if (!isDynamicPort && getServiceDescriptionImpl().getWSDLWrapper() != null)
buildEndpointDescriptionFromWSDL();
else
buildEndpointDescriptionFromNoWSDL();
} else {
//Still processing annotations from the class
- if (!isDynamicPort && getServiceDescription().getWSDLWrapper() != null) {
+ if (!isDynamicPort && getServiceDescriptionImpl().getWSDLWrapper() != null) {
buildEndpointDescriptionFromWSDL();
}
else if (implOrSEIClass != null){
@@ -664,7 +667,7 @@
}
private void buildEndpointDescriptionFromWSDL() {
- Definition wsdlDefinition = getServiceDescription().getWSDLWrapper().getDefinition();
+ Definition wsdlDefinition = getServiceDescriptionImpl().getWSDLWrapper().getDefinition();
javax.wsdl.Service wsdlService = wsdlDefinition.getService(getServiceDescription().getServiceQName());
if (wsdlService == null) {
throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr2", createAxisServiceName()));
@@ -681,11 +684,11 @@
if (wsdlPort.getName().equals(portQName.getLocalPart())) {
// Create the Endpoint Interface Description based on the WSDL.
- endpointInterfaceDescription = new EndpointInterfaceDescription(this);
+ endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(this);
// Update the EndpointInterfaceDescription created with WSDL with information from the
// annotations in the SEI
- endpointInterfaceDescription.updateWithSEI(implOrSEIClass);
+ ((EndpointInterfaceDescriptionImpl) endpointInterfaceDescription).updateWithSEI(implOrSEIClass);
wsdlPortFound = true;
}
}
@@ -755,7 +758,7 @@
// ANNOTATION: WebService and WebServiceProvider
// ===========================================
- public String getWebServiceWSDLLocation() {
+ public String getAnnoWebServiceWSDLLocation() {
if (annotation_WsdlLocation == null) {
if (getWebServiceAnnotation() != null
&& !DescriptionUtils.isEmpty(getWebServiceAnnotation().wsdlLocation())) {
@@ -773,7 +776,7 @@
return annotation_WsdlLocation;
}
- public String getWebServiceServiceName() {
+ public String getAnnoWebServiceServiceName() {
if (annotation_ServiceName == null) {
if (getWebServiceAnnotation() != null
&& !DescriptionUtils.isEmpty(getWebServiceAnnotation().serviceName())) {
@@ -782,11 +785,11 @@
else if (getWebServiceProviderAnnotation() != null
&& !DescriptionUtils.isEmpty(getWebServiceProviderAnnotation().serviceName())) {
annotation_ServiceName = getWebServiceProviderAnnotation().serviceName();
- }
+ }
else {
- // Default value is the "simple name" of the class or interface + "Service"
+ // Default value is the "simple name" of the class or interface + "Service"
// Per JSR-181 MR Sec 4.1, pg 15
- if (getServiceDescription().isDBCMap()) {
+ if (getServiceDescriptionImpl().isDBCMap()) {
annotation_ServiceName = getSimpleJavaClassName(composite.getClassName()) + "Service";
} else {
annotation_ServiceName = getSimpleJavaClassName(implOrSEIClass) + "Service";
@@ -796,7 +799,7 @@
return annotation_ServiceName;
}
- public String getWebServicePortName() {
+ public String getAnnoWebServicePortName() {
if (annotation_PortName == null) {
if (getWebServiceAnnotation() != null
&& !DescriptionUtils.isEmpty(getWebServiceAnnotation().portName())) {
@@ -818,7 +821,7 @@
// in the WebService case; it is done sepertely just to be clear there is no
// name element on the WebServiceProvider annotation
- annotation_PortName = (getServiceDescription().isDBCMap()) ?
+ annotation_PortName = (getServiceDescriptionImpl().isDBCMap()) ?
getSimpleJavaClassName(composite.getClassName()) + "Port"
: getSimpleJavaClassName(implOrSEIClass) + "Port";
}
@@ -826,14 +829,14 @@
// This is the @WebService annotation path
// Default value is the @WebService.name of the class or interface + "Port"
// Per JSR-181 MR Sec 4.1, pg 15
- annotation_PortName = getWebServiceName() + "Port";
+ annotation_PortName = getAnnoWebServiceName() + "Port";
}
}
}
return annotation_PortName;
}
- public String getWebServiceTargetNamespace() {
+ public String getAnnoWebServiceTargetNamespace() {
if (annotation_TargetNamespace == null) {
if (getWebServiceAnnotation() != null
&& !DescriptionUtils.isEmpty(getWebServiceAnnotation().targetNamespace())) {
@@ -847,7 +850,7 @@
// Default value per JSR-181 MR Sec 4.1 pg 15 defers to "Implementation defined,
// as described in JAX-WS 2.0, section 3.2" which is JAX-WS 2.0 Sec 3.2, pg 29.
// FIXME: Hardcoded protocol for namespace
- if (getServiceDescription().isDBCMap())
+ if (getServiceDescriptionImpl().isDBCMap())
annotation_TargetNamespace =
makeNamespaceFromPackageName(getJavaPackageName(composite.getClassName()), "http");
else
@@ -997,7 +1000,7 @@
return webServiceAnnotation;
}
- public String getWebServiceEndpointInterface() {
+ public String getAnnoWebServiceEndpointInterface() {
// TODO: Validation: Not allowed on WebServiceProvider
if (webService_EndpointInterface == null) {
if (!isProviderBased() && getWebServiceAnnotation() != null
@@ -1014,7 +1017,7 @@
return webService_EndpointInterface;
}
- public String getWebServiceName() {
+ public String getAnnoWebServiceName() {
// TODO: Validation: Not allowed on WebServiceProvider
//TODO: Per JSR109 v1.2 Sec. 5.3.2.1
@@ -1032,7 +1035,7 @@
webService_Name = getWebServiceAnnotation().name();
}
else {
- if (getServiceDescription().isDBCMap()) {
+ if (getServiceDescriptionImpl().isDBCMap()) {
//The name is the simple name of the class or interface
webService_Name = getSimpleJavaClassName(composite.getClassName());
} else {
@@ -1055,10 +1058,10 @@
// ANNOTATION: ServiceMode
// ===========================================
// REVIEW: Should this be returning an enum other than the one defined within the annotation?
- ServiceMode getServiceMode() {
+ ServiceMode getAnnoServiceMode() {
if (serviceModeAnnotation == null) {
- if (getServiceDescription().isDBCMap()) {
+ if (getServiceDescriptionImpl().isDBCMap()) {
serviceModeAnnotation = composite.getServiceModeAnnot();
} else {
if (implOrSEIClass != null) {
@@ -1069,11 +1072,16 @@
return serviceModeAnnotation;
}
- public Service.Mode getServiceModeValue() {
+ public Service.Mode getServiceMode() {
+ // TODO: (JLB) WSDL/Anno Merge
+ return getAnnoServiceModeValue();
+ }
+
+ public Service.Mode getAnnoServiceModeValue() {
// This annotation is only valid on Provider-based endpoints.
if (isProviderBased() && serviceModeValue == null) {
- if (getServiceMode() != null) {
- serviceModeValue = getServiceMode().value();
+ if (getAnnoServiceMode() != null) {
+ serviceModeValue = getAnnoServiceMode().value();
}
else {
serviceModeValue = ServiceMode_DEFAULT;
@@ -1086,23 +1094,28 @@
// ANNOTATION: BindingType
// ===========================================
- BindingType getBindingType() {
+ BindingType getAnnoBindingType() {
if (bindingTypeAnnotation == null) {
- if (getServiceDescription().isDBCMap()) {
+ if (getServiceDescriptionImpl().isDBCMap()) {
bindingTypeAnnotation = composite.getBindingTypeAnnot();
} else {
if (implOrSEIClass != null) {
bindingTypeAnnotation = (BindingType) implOrSEIClass.getAnnotation(BindingType.class);
}
}
- }
+ }
return bindingTypeAnnotation;
}
- public String getBindingTypeValue() {
+ public String getBindingType() {
+ // TODO: (JLB) Implement WSDL/Anno merge
+ return getAnnoBindingTypeValue();
+ }
+
+ public String getAnnoBindingTypeValue() {
if (bindingTypeValue == null) {
- if (getBindingType() != null) {
- bindingTypeValue = getBindingType().value();
+ if (getAnnoBindingType() != null) {
+ bindingTypeValue = getAnnoBindingType().value();
}
else {
// No BindingType annotation present; use default value
@@ -1128,3 +1141,5 @@
return handlerList;
}
}
+
+
Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionJava.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionJava.java?view=auto&rev=470629
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionJava.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionJava.java Thu Nov 2 17:33:00 2006
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.description;
+
+import javax.xml.ws.Service;
+
+/**
+ *
+ */
+public interface EndpointDescriptionJava {
+
+ public abstract String getAnnoBindingTypeValue();
+
+ public abstract Service.Mode getAnnoServiceModeValue();
+
+ public abstract String getAnnoWebServiceEndpointInterface();
+ public abstract String getAnnoWebServiceName();
+ public abstract String getAnnoWebServicePortName();
+ public abstract String getAnnoWebServiceServiceName();
+ public abstract String getAnnoWebServiceTargetNamespace();
+ public abstract String getAnnoWebServiceWSDLLocation();
+}
Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionWSDL.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionWSDL.java?view=auto&rev=470629
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionWSDL.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointDescriptionWSDL.java Thu Nov 2 17:33:00 2006
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.description;
+
+/**
+ *
+ */
+public interface EndpointDescriptionWSDL {
+
+}
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java?view=diff&rev=470629&r1=470628&r2=470629
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/EndpointInterfaceDescription.java Thu Nov 2 17:33:00 2006
@@ -1,623 +1,40 @@
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
package org.apache.axis2.jaxws.description;
import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Iterator;
-import javax.jws.soap.SOAPBinding;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingType;
-
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.jaxws.ExceptionFactory;
-import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
-import org.apache.axis2.jaxws.description.builder.MDQConstants;
-import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.BasicConfigurator;
-
-/**
- * An EndpointInterfaceDescription corresponds to a particular SEI-based Service
- * Implementation. It can correspond to either either a client to that impl or
- * the actual service impl.
- *
- * The EndpointInterfaceDescription contains information that is relevant only
- * to an SEI-based (aka Endpoint-based or Java-based) enpdoint; Provider-based
- * endpoint, which are not operation based and do not have an associated SEI,
- * will not have an an EndpointInterfaceDescription class and sub-hierachy.
- *
- * <pre>
- * <b>EndpointInterfaceDescription details</b>
- *
- * CORRESPONDS TO: An SEI (on both Client and Server)
- *
- * AXIS2 DELEGATE: none
- *
- * CHILDREN: 1..n OperationDescription
- *
- * ANNOTATIONS:
- * SOAPBinding [181]
- *
- * WSDL ELEMENTS:
- * portType
- *
- * </pre>
- */
-
-/*
-Java Name: SEI Class name
-
-Axis2 Delegate: none
-
-JSR-181 Annotations:
-@WebService Note this can be specified on the endpoint Impl without an SEI
-- name its the PortType Class Name, one you get with getPort() call in Service Delegate [NT]
-- targetNamespace
-- serviceName default is portType+Service. Should we use this if Service.create call does not provide/have ServiceQname?[NT]
-- wsdlLocation if no wsdl location provided the read this annotation. Should this override what is client sets?[NT]
-- endpointInterface Will not be present on interfaces (SEI), so I will use this to figure out if the client Call is Extension of Service or is SEI by looking at this annotation. [NT]
-- portName ok so JSR 181 spec I have does not have this annotation but JAXWS spec I have has this. So if ServiceDelegate.getPort() does not have port name use this annotation and derive portName [NT]
-@SOAPBinding This one is important for Proxy especially. [NT]
-- style: DOCUMENT | RPC tells me if it is doc or rpc[NT]
-- use: LITERAL | ENCODED Always literal for IBM[NT]
-- parameterStyle: BARE | WRAPPED tells me if the wsdl is wrapped or not wrapped [NT]
-@HandlerChain(file, name)
-TBD
-
-WSDL Elements
-<portType
-<binding used for operation parameter bindings below
-
-Properties available to JAXWS runtime:
-getHandlerList() returns a live List of handlers which can be modified; this MUST be cloned before being used as an actual handler chain; Note this needs to consider if any @HandlerChain annotations are in the ServiceDescription as well
-TBD
-
- */
-public class EndpointInterfaceDescription {
- private EndpointDescription parentEndpointDescription;
- private ArrayList<OperationDescription> operationDescriptions = new ArrayList<OperationDescription>();
- // This may be an actual Service Endpoint Interface -OR- it may be a service implementation class that did not
- // specify an @WebService.endpointInterface.
- private Class seiClass;
- private DescriptionBuilderComposite dbc;
-
- //Logging setup
- private static final Log log = LogFactory.getLog(EndpointInterfaceDescription.class);
-
- // ===========================================
- // ANNOTATION related information
- // ===========================================
-
- // ANNOTATION: @SOAPBinding
- // Note this is the Type-level annotation. See OperationDescription for the Method-level annotation
- private SOAPBinding soapBindingAnnotation;
- // TODO: Should this be using the jaxws annotation values or should that be wrappered?
- private javax.jws.soap.SOAPBinding.Style soapBindingStyle;
- // Default value per JSR-181 MR Sec 4.7 "Annotation: javax.jws.soap.SOAPBinding" pg 28
- public static final javax.jws.soap.SOAPBinding.Style SOAPBinding_Style_DEFAULT = javax.jws.soap.SOAPBinding.Style.DOCUMENT;
- private javax.jws.soap.SOAPBinding.Use soapBindingUse;
- // Default value per JSR-181 MR Sec 4.7 "Annotation: javax.jws.soap.SOAPBinding" pg 28
- public static final javax.jws.soap.SOAPBinding.Use SOAPBinding_Use_DEFAULT = javax.jws.soap.SOAPBinding.Use.LITERAL;
- private javax.jws.soap.SOAPBinding.ParameterStyle soapParameterStyle;
- // Default value per JSR-181 MR Sec 4.7 "Annotation: javax.jws.soap.SOAPBinding" pg 28
- public static final javax.jws.soap.SOAPBinding.ParameterStyle SOAPBinding_ParameterStyle_DEFAULT = javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED;
-
- void addOperation(OperationDescription operation) {
- operationDescriptions.add(operation);
- }
-
- EndpointInterfaceDescription(Class sei, EndpointDescription parent) {
- seiClass = sei;
-
- // Per JSR-181 all methods on the SEI are mapped to operations regardless
- // of whether they include an @WebMethod annotation. That annotation may
- // be present to customize the mapping, but is not required (p14)
- // TODO: Testcases that do and do not include @WebMethod anno
- for (Method method:getSEIMethods(seiClass)) {
- OperationDescription operation = new OperationDescription(method, this);
- addOperation(operation);
- }
-
- parentEndpointDescription = parent;
- }
-
- /**
- * Build from AxisService
- * @param parent
- */
- EndpointInterfaceDescription(EndpointDescription parent) {
- parentEndpointDescription = parent;
-
- AxisService axisService = parentEndpointDescription.getAxisService();
- if (axisService != null) {
- ArrayList publishedOperations = axisService.getPublishedOperations();
- Iterator operationsIterator = publishedOperations.iterator();
- while (operationsIterator.hasNext()) {
- AxisOperation axisOperation = (AxisOperation) operationsIterator.next();
- addOperation(new OperationDescription(axisOperation, this));
- }
- }
- }
-
- /**
- * Build an EndpointInterfaceDescription from a DescriptionBuilderComposite
- * @param dbc
- * @param isClass
- * @param parent
- */
- EndpointInterfaceDescription( DescriptionBuilderComposite dbc,
- boolean isClass,
- EndpointDescription parent){
-
- parentEndpointDescription = parent;
- this.dbc = dbc;
-
- BasicConfigurator.configure();
-
- //TODO: Determine if the isClass parameter is really necessary
-
- // Per JSR-181 all methods on the SEI are mapped to operations regardless
- // of whether they include an @WebMethod annotation. That annotation may
- // be present to customize the mapping, but is not required (p14)
-
- // TODO: Testcases that do and do not include @WebMethod anno
-
- //We are processing the SEI composite
- //For every MethodDescriptionComposite in this list, call OperationDescription
- //constructor for it, then add this operation
-
- //Retrieve the relevent method composites for this dbc (and those in the superclass chain)
- Iterator<MethodDescriptionComposite> iter = retrieveReleventMethods(dbc);
-
- log.debug("EndpointInterfaceDescription: Finished retrieving methods");
- MethodDescriptionComposite mdc = null;
-
- while (iter.hasNext()) {
- mdc = iter.next();
-
- //TODO: Verify that this classname is truly always the wrapper class
- mdc.setDeclaringClass(dbc.getClassName());
- OperationDescription operation = new OperationDescription(mdc, this);
-
- //TODO: Do we need to worry about a null AxisOperation at this level?
-
- //Add this AxisOperation to the AxisService
- getEndpointDescription().getAxisService().addOperation(operation.getAxisOperation());
-
- log.debug("EID: Just added operation= " +operation.getWebMethodOperationName());
- addOperation(operation);
-
- }
-
- log.debug("EndpointInterfaceDescription: Finished Adding operations");
-
- //TODO: Need to process the other annotations that can exist, on the server side
- // and at the class level.
- // They are, as follows:
- // HandlerChain (181)
- // SoapBinding (181)
- // WebServiceRefAnnot (List) (JAXWS)
- // BindingTypeAnnot (JAXWS Sec. 7.8 -- Used to set either the AS.endpoint, or AS.SoapNSUri)
- // WebServiceContextAnnot (JAXWS via injection)
-
- BasicConfigurator.resetConfiguration();
- }
-
- private static Method[] getSEIMethods(Class sei) {
- // Per JSR-181 all methods on the SEI are mapped to operations regardless
- // of whether they include an @WebMethod annotation. That annotation may
- // be present to customize the mapping, but is not required (p14)
- Method[] seiMethods = sei.getMethods();
- if (sei != null) {
- for (Method method:seiMethods) {
- if (!Modifier.isPublic(method.getModifiers())) {
- // JSR-181 says methods must be public (p14)
- // TODO NLS
- ExceptionFactory.makeWebServiceException("SEI methods must be public");
- }
- // TODO: other validation per JSR-181
- }
-
- }
- return seiMethods;
- }
-
- /**
- * Update a previously created EndpointInterfaceDescription with information from an
- * annotated SEI. This should only be necessary when the this was created with WSDL.
- * In this case, the information from the WSDL is augmented based on the annotated SEI.
- * @param sei
- */
- public void updateWithSEI(Class sei) {
- if (seiClass != null && seiClass != sei)
- // TODO: It probably is invalid to try reset the SEI; but this isn't the right error processing
- throw new UnsupportedOperationException("The seiClass is already set; reseting it is not supported");
- else if (seiClass != null && seiClass == sei)
- // We've already done the necessary updates for this SEI
- return;
- else if (sei != null) {
- seiClass = sei;
- // Update (or possibly add) the OperationDescription for each of the methods on the SEI.
- for (Method seiMethod:getSEIMethods(seiClass)) {
- if (getOperation(seiMethod) != null) {
- // If an OpDesc already exists with this java method set on it, then the OpDesc has already
- // been updated for this method, so skip it.
- continue;
- }
- // At this point (for now at least) the operations were created with WSDL previously.
- // If they had been created from an annotated class and no WSDL, then the seiClass would have
- // already been set so we would have taken other branches in this if test. (Note this could
- // change once AxisServices can be built from annotations by the ServiceDescription class).
- // Since the operations were created from WSDL, they will not have a java method, which
- // comes from the SEI, set on them yet.
- //
- // Another consideration is that currently Axis2 does not support overloaded WSDL operations.
- // That means there will only be one OperationDesc build from WSDL. Still another consideration is
- // that the JAXWS async methods which may exist on the SEI will NOT exist in the WSDL. An example
- // of these methods for the WSDL operation:
- // String echo(String)
- // optionally generated JAX-WS SEI methods from the tooling; take note of the annotation specifying the
- // operation name
- // @WebMethod(operationName="echo" ...)
- // Response<String> echoStringAsync(String)
- // @WebMethod(operationName="echo" ...)
- // Future<?> echoStringAsync(String, AsyncHandler)
- //
- // So given all the above, the code does the following based on the operation QName
- // (which might also be the java method name; see determineOperationQName for details)
- // (1) If an operationDesc does not exist, add it.
- // (2) If an operationDesc does exist but does not have a java method set on it, set it
- // (3) If an operationDesc does exist and has a java method set on it already, add a new one.
- //
- // TODO: May need to change when Axis2 supports overloaded WSDL operations
- // TODO: May need to change when ServiceDescription can build an AxisService from annotations
-
- // Get the QName for this java method and then update (or add) the appropriate OperationDescription
- // See comments below for imporant notes about the current implementation.
- // NOTE ON OVERLOADED OPERATIONS
- // Axis2 does NOT currently support overloading WSDL operations.
- QName seiOperationQName = OperationDescription.determineOperationQName(seiMethod);
- OperationDescription[] updateOpDesc = getOperation(seiOperationQName);
- if (updateOpDesc == null || updateOpDesc.length == 0) {
- // This operation wasn't defined in the WSDL. Note that the JAX-WS async methods
- // which are defined on the SEI are not defined as operations in the WSDL.
- // Although they usually specific the same OperationName as the WSDL operation,
- // there may be cases where they do not.
- // TODO: Is this path an error path, or can the async methods specify different operation names than the
- // WSDL operation?
- OperationDescription operation = new OperationDescription(seiMethod, this);
- addOperation(operation);
- }
- else {
- // Currently Axis2 does not support overloaded operations. That means that even if the WSDL
- // defined overloaded operations, there would still only be a single AxisOperation, and it
- // would be the last operation encounterd.
- // HOWEVER the generated JAX-WS async methods (see above) may (will always?) have the same
- // operation name and so will come down this path; they need to be added.
- // TODO: When Axis2 starts supporting overloaded operations, then this logic will need to be changed
- // TODO: Should we verify that these are the async methods before adding them, and treat it as an error otherwise?
-
- // Loop through all the opdescs; if one doesn't currently have a java method set, set it
- // If all have java methods set, then add a new one. Assume we'll need to add a new one.
- boolean addOpDesc = true;
- for (OperationDescription checkOpDesc:updateOpDesc) {
- if (checkOpDesc.getSEIMethod() == null) {
- // TODO: Should this be checking (somehow) that the signature matches? Probably not an issue until overloaded WSDL ops are supported.
- checkOpDesc.setSEIMethod(seiMethod);
- addOpDesc = false;
- break;
- }
- }
- if (addOpDesc) {
- OperationDescription operation = new OperationDescription(seiMethod, this);
- addOperation(operation);
- }
- }
- }
- }
- }
-
- /**
- * Return the OperationDescriptions corresponding to a particular Java method name.
- * Note that an array is returned because a method could be overloaded.
- *
- * @param javaMethodName String representing a Java Method Name
- * @return
- */
- // FIXME: This is confusing; some getOperations use the QName from the WSDL or annotation;
- // this one uses the java method name; rename this signature I think; add on that takes a String but does a QName lookup against the WSDL/Annotation
- public OperationDescription[] getOperationForJavaMethod(String javaMethodName) {
- if (DescriptionUtils.isEmpty(javaMethodName)) {
- return null;
- }
-
- ArrayList<OperationDescription> matchingOperations = new ArrayList<OperationDescription>();
- for (OperationDescription operation:getOperations()) {
- if (javaMethodName.equals(operation.getJavaMethodName())) {
- matchingOperations.add(operation);
- }
- }
-
- if (matchingOperations.size() == 0)
- return null;
- else
- return matchingOperations.toArray(new OperationDescription[0]);
- }
-
- /**
- * Return the OperationDesription (only one) corresponding to the OperationName passed in.
- * @param operationName
- * @return
- */
- public OperationDescription getOperation(String operationName) {
- if (DescriptionUtils.isEmpty(operationName)) {
- return null;
- }
-
- OperationDescription matchingOperation = null;
- for (OperationDescription operation:getOperations()) {
- if (operationName.equals(operation.getWebMethodOperationName())) {
- matchingOperation = operation;
- break;
- }
- }
- return matchingOperation;
- }
-
- public OperationDescription[] getOperations() {
- return operationDescriptions.toArray(new OperationDescription[0]);
- }
-
- public EndpointDescription getEndpointDescription() {
- return parentEndpointDescription;
- }
-
- /**
- * Return an array of Operations given an operation QName. Note that an array is returned
- * since a WSDL operation may be overloaded per JAX-WS.
- * @param operationQName
- * @return
- */
- public OperationDescription[] getOperation(QName operationQName) {
- OperationDescription[] returnOperations = null;
- if (!DescriptionUtils.isEmpty(operationQName)) {
- ArrayList<OperationDescription> matchingOperations = new ArrayList<OperationDescription>();
- OperationDescription[] allOperations = getOperations();
- for (OperationDescription operation:allOperations) {
- if (operation.getName().equals(operationQName)) {
- matchingOperations.add(operation);
- }
- }
- // Only return an array if there's anything in it
- if (matchingOperations.size() > 0) {
- returnOperations = matchingOperations.toArray(new OperationDescription[0]);
- }
- }
- return returnOperations;
- }
-
- /**
- * Return an OperationDescription for the corresponding SEI method. Note that this ONLY works
- * if the OperationDescriptions were created from introspecting an SEI. If the were created with a WSDL
- * then use the getOperation(QName) method, which can return > 1 operation.
- * @param seiMethod The java.lang.Method from the SEI for which an OperationDescription is wanted
- * @return
- */
- public OperationDescription getOperation(Method seiMethod) {
- OperationDescription returnOperation = null;
- if (seiMethod != null) {
- OperationDescription[] allOperations = getOperations();
- for (OperationDescription operation:allOperations) {
- if (operation.getSEIMethod() != null && operation.getSEIMethod().equals(seiMethod)) {
- returnOperation = operation;
- }
- }
- }
- return returnOperation;
- }
-
- public Class getSEIClass() {
- return seiClass;
- }
- // Annotation-related getters
-
- // ========================================
- // SOAP Binding annotation related methods
- // ========================================
- SOAPBinding getSoapBinding(){
- // TODO: Test with sei Null, not null, SOAP Binding annotated, not annotated
-
- if (soapBindingAnnotation == null) {
- if (dbc != null) {
- soapBindingAnnotation = dbc.getSoapBindingAnnot();
- } else {
- if (seiClass != null) {
- soapBindingAnnotation = (SOAPBinding) seiClass.getAnnotation(SOAPBinding.class);
- }
- }
- }
- return soapBindingAnnotation;
- }
+public interface EndpointInterfaceDescription {
+ public abstract EndpointDescription getEndpointDescription();
- public javax.jws.soap.SOAPBinding.Style getSoapBindingStyle() {
- if (soapBindingStyle == null) {
- if (getSoapBinding() != null && getSoapBinding().style() != null) {
- soapBindingStyle = getSoapBinding().style();
- }
- else {
- soapBindingStyle = SOAPBinding_Style_DEFAULT;
- }
- }
- return soapBindingStyle;
- }
+ public abstract OperationDescription getOperation(Method seiMethod);
+ public abstract OperationDescription[] getOperation(QName operationQName);
+ public abstract OperationDescription getOperation(String operationName);
+ public abstract OperationDescription[] getOperations();
+ public abstract OperationDescription[] getOperationForJavaMethod(String javaMethodName);
+
+ public abstract Class getSEIClass();
+
+ public abstract javax.jws.soap.SOAPBinding.ParameterStyle getSoapBindingParameterStyle();
+ public abstract javax.jws.soap.SOAPBinding.Style getSoapBindingStyle();
+ public abstract javax.jws.soap.SOAPBinding.Use getSoapBindingUse();
- public javax.jws.soap.SOAPBinding.Use getSoapBindingUse() {
- if (soapBindingUse == null) {
- if (getSoapBinding() != null && getSoapBinding().use() != null) {
- soapBindingUse = getSoapBinding().use();
- }
- else {
- soapBindingUse = SOAPBinding_Use_DEFAULT;
- }
- }
- return soapBindingUse;
- }
-
- public javax.jws.soap.SOAPBinding.ParameterStyle getSoapBindingParameterStyle(){
- if (soapParameterStyle == null) {
- if (getSoapBinding() != null && getSoapBinding().parameterStyle() != null) {
- soapParameterStyle = getSoapBinding().parameterStyle();
- }
- else {
- soapParameterStyle = SOAPBinding_ParameterStyle_DEFAULT;
- }
- }
- return soapParameterStyle;
- }
-
- public Iterator<MethodDescriptionComposite> retrieveReleventMethods(DescriptionBuilderComposite dbc) {
-
- /*
- * Depending on whether this is an implicit SEI or an actual SEI, Gather up and build a
- * list of MDC's. If this is an actual SEI, then starting with this DBC, build a list of all
- * MDC's that are public methods in the chain of extended classes.
- * If this is an implicit SEI, then starting with this DBC,
- * 1. If a false exclude is found, then take only those that have false excludes
- * 2. Assuming no false excludes, take all public methods that don't have exclude == true
- * 3. For each super class, if 'WebService' present, take all MDC's according to rules 1&2
- * But, if WebService not present, grab only MDC's that are annotated.
- */
- if (log.isTraceEnabled()) {
- log.trace("retrieveReleventMethods: Enter");
- }
-
- ArrayList<MethodDescriptionComposite> retrieveList = new ArrayList<MethodDescriptionComposite>();
-
- if (dbc.isInterface()) {
-
- retrieveList = retrieveSEIMethods(dbc);
-
- //Now gather methods off the chain of superclasses, if any
- DescriptionBuilderComposite tempDBC = dbc;
- while (!DescriptionUtils.isEmpty(tempDBC.getSuperClassName())) {
- DescriptionBuilderComposite superDBC =
- getEndpointDescription().getServiceDescription().getDBCMap().get(tempDBC.getSuperClassName());
- retrieveList.addAll(retrieveSEIMethods(superDBC));
- tempDBC = superDBC;
- }
-
- } else {
- //this is an implied SEI...rules are more complicated
-
- retrieveList = retrieveImplicitSEIMethods(dbc);
-
- //Now, continue to build this list with relevent methods in the chain of
- //superclasses. If the logic for processing superclasses is the same as for
- //the original SEI, then we can combine this code with above code. But, its possible
- //the logic is different for superclasses...keeping separate for now.
- DescriptionBuilderComposite tempDBC = dbc;
-
- while (!DescriptionUtils.isEmpty(tempDBC.getSuperClassName())) {
-
- //verify that this superclass name is not
- // java.lang.object, if so, then we're done processing
- if (DescriptionUtils.javifyClassName(tempDBC.getSuperClassName()).equals(MDQConstants.OBJECT_CLASS_NAME))
- break;
-
- DescriptionBuilderComposite superDBC =
- getEndpointDescription().getServiceDescription().getDBCMap().get(tempDBC.getSuperClassName());
-
- if (log.isTraceEnabled())
- log.trace("superclass name for this DBC is:" +tempDBC.getSuperClassName());
-
- //Verify that we can find the SEI in the composite list
- if (superDBC == null){
- throw ExceptionFactory.makeWebServiceException("EndpointInterfaceDescription: cannot find super class that was specified for this class");
- }
-
- if (superDBC.getWebServiceAnnot() != null) {
- //Now, gather the list of Methods just like we do for the lowest subclass
- retrieveList.addAll(retrieveImplicitSEIMethods(superDBC));
- } else {
- //This superclass does not contain a WebService annotation, add only the
- //methods that are annotated with WebMethod
-
- Iterator<MethodDescriptionComposite> iterMethod = dbc.getMethodDescriptionsList().iterator();
-
- while (iterMethod.hasNext()) {
- MethodDescriptionComposite mdc = iterMethod.next();
-
- if (!DescriptionUtils.isExcludeTrue(mdc)) {
- retrieveList.add(mdc);
- }
- }
- }
- tempDBC = superDBC;
- } //Done with implied SEI's superclasses
-
- }//Done with implied SEI's
-
- return retrieveList.iterator();
- }
-
- private ArrayList<MethodDescriptionComposite> retrieveImplicitSEIMethods(DescriptionBuilderComposite dbc) {
-
- ArrayList<MethodDescriptionComposite> retrieveList = new ArrayList<MethodDescriptionComposite>();
-
- retrieveList = DescriptionUtils.getMethodsWithFalseExclusions(dbc);
-
- //If this list is empty, then there are no false exclusions, so gather
- //all composites that don't have exclude == true
- if (retrieveList == null) {
- Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
-
- while (iter.hasNext()) {
- MethodDescriptionComposite mdc = iter.next();
-
- if (!DescriptionUtils.isExcludeTrue(mdc)) {
- retrieveList.add(mdc);
- }
- }
- }
-
- return retrieveList;
- }
-
- private ArrayList<MethodDescriptionComposite> retrieveSEIMethods(DescriptionBuilderComposite dbc) {
-
- //Rules for retrieving Methods on an SEI (or a superclass of an SEI) are simple
- //Just retrieve all methods regardless of WebMethod annotations
- ArrayList<MethodDescriptionComposite> retrieveList = new ArrayList<MethodDescriptionComposite>();
-
- Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
-
- while (iter.hasNext()) {
- MethodDescriptionComposite mdc = iter.next();
- retrieveList.add(mdc);
- }
-
- return retrieveList;
- }
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org