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 ng...@apache.org on 2007/03/27 04:56:39 UTC
svn commit: r522716 - in
/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl:
DescriptionFactoryImpl.java DescriptionUtils.java
EndpointDescriptionImpl.java
Author: ngallardo
Date: Mon Mar 26 19:56:39 2007
New Revision: 522716
URL: http://svn.apache.org/viewvc?view=rev&rev=522716
Log:
Formatting changes...
Modified:
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?view=diff&rev=522716&r1=522715&r2=522716
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Mon Mar 26 19:56:39 2007
@@ -21,7 +21,6 @@
/**
*
*/
-
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
@@ -43,7 +42,6 @@
import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
import org.apache.axis2.jaxws.description.validator.ServiceDescriptionValidator;
-import org.apache.axis2.jaxws.description.validator.ValidationFailures;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?view=diff&rev=522716&r1=522715&r2=522716
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java Mon Mar 26 19:56:39 2007
@@ -1,21 +1,21 @@
/*
- * 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
- *
+ * 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.
+ *
+ * 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.impl;
import static org.apache.axis2.jaxws.description.builder.MDQConstants.CONSTRUCTOR_METHOD;
@@ -32,7 +32,6 @@
import javax.xml.namespace.QName;
-import org.apache.axiom.om.OMElement;
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
@@ -55,52 +54,50 @@
return qname == null || isEmpty(qname.getLocalPart());
}
- /**
- * @return Returns TRUE if we find just one WebMethod Annotation with exclude flag
- * set to false
- */
- static boolean falseExclusionsExist(DescriptionBuilderComposite dbc) {
-
- MethodDescriptionComposite mdc = null;
- Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
-
- while (iter.hasNext()) {
- mdc = iter.next();
-
- WebMethodAnnot wma = mdc.getWebMethodAnnot();
- if (wma != null) {
- if (wma.exclude() == false)
- return true;
- }
- }
+ /**
+ * @return Returns TRUE if we find just one WebMethod Annotation with exclude flag
+ * set to false
+ */
+ static boolean falseExclusionsExist(DescriptionBuilderComposite dbc) {
+ MethodDescriptionComposite mdc = null;
+ Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
+
+ while (iter.hasNext()) {
+ mdc = iter.next();
+
+ WebMethodAnnot wma = mdc.getWebMethodAnnot();
+ if (wma != null) {
+ if (wma.exclude() == false)
+ return true;
+ }
+ }
- return false;
- }
+ return false;
+ }
- /**
- * Gathers all MethodDescriptionCompsite's that contain a WebMethod Annotation with the
- * exclude set to FALSE
- * @return Returns List<MethodDescriptionComposite>
- */
- static ArrayList<MethodDescriptionComposite> getMethodsWithFalseExclusions(DescriptionBuilderComposite dbc) {
-
- ArrayList<MethodDescriptionComposite> mdcList = new ArrayList<MethodDescriptionComposite>();
- Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
+ /**
+ * Gathers all MethodDescriptionCompsite's that contain a WebMethod Annotation with the
+ * exclude set to FALSE
+ * @return Returns List<MethodDescriptionComposite>
+ */
+ static ArrayList<MethodDescriptionComposite> getMethodsWithFalseExclusions(DescriptionBuilderComposite dbc) {
+ ArrayList<MethodDescriptionComposite> mdcList = new ArrayList<MethodDescriptionComposite>();
+ Iterator<MethodDescriptionComposite> iter = dbc.getMethodDescriptionsList().iterator();
+
+ if (DescriptionUtils.falseExclusionsExist(dbc)) {
+ while (iter.hasNext()) {
+ MethodDescriptionComposite mdc = iter.next();
+ if (mdc.getWebMethodAnnot() != null) {
+ if (mdc.getWebMethodAnnot().exclude() == false) {
+ mdc.setDeclaringClass(dbc.getClassName());
+ mdcList.add(mdc);
+ }
+ }
+ }
+ }
- if (DescriptionUtils.falseExclusionsExist(dbc)) {
- while (iter.hasNext()) {
- MethodDescriptionComposite mdc = iter.next();
- if (mdc.getWebMethodAnnot() != null) {
- if (mdc.getWebMethodAnnot().exclude() == false) {
- mdc.setDeclaringClass(dbc.getClassName());
- mdcList.add(mdc);
- }
- }
- }
- }
-
- return mdcList;
- }
+ return mdcList;
+ }
/*
* Check whether a MethodDescriptionComposite contains a WebMethod annotation with
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?view=diff&rev=522716&r1=522715&r2=522716
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Mon Mar 26 19:56:39 2007
@@ -1,18 +1,20 @@
/*
- * 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
- *
+ * 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.
+ *
+ * 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.impl;
@@ -1177,57 +1179,51 @@
*
*/
public HandlerChainsType getHandlerChain() {
-
- // TODO: This needs to work for DBC or class
-
- if (handlerChainsType == null) {
-
- getAnnoHandlerChainAnnotation();
- if (handlerChainAnnotation != null) {
-
- String handlerFileName = handlerChainAnnotation.file();
-
- // TODO RAS & NLS
- if (log.isDebugEnabled()) {
- log.debug("EndpointDescriptionImpl.getHandlerList: fileName: "
- + handlerFileName
- + " className: "
- + composite.getClassName());
- }
-
- InputStream is = DescriptionUtils.openHandlerConfigStream(
- handlerFileName,
- composite.getClassName(),
- composite.getClassLoader());
-
- try {
-
- // All the classes we need should be part of this package
- JAXBContext jc = JAXBContext
- .newInstance("org.apache.axis2.jaxws.description.xml.handler",
- this.getClass().getClassLoader());
+ // TODO: This needs to work for DBC or class
+ if (handlerChainsType == null) {
+ getAnnoHandlerChainAnnotation();
+ if (handlerChainAnnotation != null) {
+ String handlerFileName = handlerChainAnnotation.file();
+
+ // TODO RAS & NLS
+ if (log.isDebugEnabled()) {
+ log.debug("EndpointDescriptionImpl.getHandlerList: fileName: "
+ + handlerFileName
+ + " className: "
+ + composite.getClassName());
+ }
- Unmarshaller u = jc.createUnmarshaller();
+ InputStream is = DescriptionUtils.openHandlerConfigStream(
+ handlerFileName,
+ composite.getClassName(),
+ composite.getClassLoader());
+
+ try {
+ // All the classes we need should be part of this package
+ JAXBContext jc = JAXBContext.newInstance("org.apache.axis2.jaxws.description.xml.handler",
+ this.getClass().getClassLoader());
+
+ Unmarshaller u = jc.createUnmarshaller();
- JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
- handlerChainsType = (HandlerChainsType) o.getValue();
+ JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
+ handlerChainsType = (HandlerChainsType) o.getValue();
- } catch (Exception e) {
- throw ExceptionFactory
- .makeWebServiceException("EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
- }
- }
- }
- return handlerChainsType;
+ } catch (Exception e) {
+ throw ExceptionFactory
+ .makeWebServiceException("EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
+ }
+ }
+ }
+ return handlerChainsType;
}
public HandlerChain getAnnoHandlerChainAnnotation() {
if (this.handlerChainAnnotation == null){
- if (getServiceDescriptionImpl().isDBCMap()) {
- handlerChainAnnotation = composite.getHandlerChainAnnot();
- } else {
- //TODO: Implement this for reflection
- }
+ if (getServiceDescriptionImpl().isDBCMap()) {
+ handlerChainAnnotation = composite.getHandlerChainAnnot();
+ } else {
+ //TODO: Implement this for reflection
+ }
}
return handlerChainAnnotation;
@@ -1242,7 +1238,6 @@
* @return A List of handlers for this port. The actual list is returned, and therefore can be modified.
*/
public List<String> getHandlerList() {
-
return handlerList;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org