You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ba...@apache.org on 2008/02/11 18:43:06 UTC

svn commit: r620539 - in /webservices/axis2/trunk/java/modules/metadata: src/org/apache/axis2/jaxws/description/builder/ src/org/apache/axis2/jaxws/description/impl/ test/org/apache/axis2/jaxws/description/impl/

Author: barrettj
Date: Mon Feb 11 09:43:02 2008
New Revision: 620539

URL: http://svn.apache.org/viewvc?rev=620539&view=rev
Log:
Remove methods to set/get an InputStream for handler chains.  Only a HandlerChain annotation or a JAXB object containing the handler chain config file should be set on the composite.
Setting the InputStream was code that was added and never used; setting the JAXB object directly is used instead.

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java?rev=620539&r1=620538&r2=620539&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java Mon Feb 11 09:43:02 2008
@@ -108,12 +108,9 @@
     private WsdlGenerator wsdlGenerator;
     private ClassLoader classLoader;
     
-    // represents a stream to the XML handler chain configuration
+    // JAXB object used to represent handler chain configuration info
     // either this or the HandlerChainAnnot may be present, but 
     // not both, they may both be null
-    private InputStream handlerChainSource;
-    
-    // JAXB object used to represent handler chain configuration info
     private HandlerChainsType handlerChainsType = null;
     
     // Does this composite represent a service requester or service provider.
@@ -640,14 +637,6 @@
     public void setClassLoader(ClassLoader classLoader) {
 
         this.classLoader = classLoader;
-    }
-    
-    public void setHandlerChainSource(InputStream handlerChainSource) {
-    	this.handlerChainSource = handlerChainSource;
-    }
-    
-    public InputStream getHandlerChainSource() {
-    	return handlerChainSource;
     }
     
     public HandlerChainsType getHandlerChainsType() {

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?rev=620539&r1=620538&r2=620539&view=diff
==============================================================================
--- 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 Feb 11 09:43:02 2008
@@ -288,13 +288,11 @@
             throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr3"));
         }
         
-        if(composite.getHandlerChainAnnot() != null && composite.getHandlerChainSource() != null) {
+        if(composite.getHandlerChainAnnot() != null && composite.getHandlerChainsType() != null) {
         	throw ExceptionFactory.makeWebServiceException(
             Messages.getMessage("handlerSourceFail", composite.getClassName()));
         }
         
-        handlerChainSource = composite.getHandlerChainSource();
-        
         handlerChainsType = composite.getHandlerChainsType();
 
         //Set the base level of annotation that we are processing...currently
@@ -1340,7 +1338,6 @@
     public HandlerChain getAnnoHandlerChainAnnotation() {
         if (this.handlerChainAnnotation == null) {
             if (composite.isServiceProvider() && !composite.isDeprecatedServiceProviderConstruction()) {
-//            if (getServiceDescriptionImpl().isDBCMap()) {
                 /*
                  * Per JSR-181 The @HandlerChain annotation MAY be present on
                  * the endpoint interface and service implementation bean. The

Modified: webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java?rev=620539&r1=620538&r2=620539&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java Mon Feb 11 09:43:02 2008
@@ -46,6 +46,7 @@
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.WebServiceAnnot;
 import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
+import org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType;
 import org.apache.axis2.metadata.registry.MetadataFactoryRegistry;
 
 public class DescriptionFactoryImplTests extends TestCase {
@@ -183,14 +184,15 @@
         }
     }
     
-    public void testHandlerChainSource() {
+    public void testHandlerChainType() {
     	JavaClassToDBCConverter converter = new JavaClassToDBCConverter(AnnotatedService.class);
         HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();
         DescriptionBuilderComposite dbc = dbcMap.get(AnnotatedService.class.getName());
         assertNotNull(dbc);
         InputStream is = getXMLFileStream();
         assertNotNull(is);
-        dbc.setHandlerChainSource(is);
+        HandlerChainsType hct = DescriptionUtils.loadHandlerChains(is, this.getClass().getClassLoader());
+        dbc.setHandlerChainsType(hct);
         List<ServiceDescription> sdList = DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(dbcMap);
         assertNotNull(sdList);
         assertTrue(sdList.size() > 0);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org