ws-wsif-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl SOAPJMSBindingGenerator.java JavaBindingGenerator.java EJBBindingGenerator.java ModelBindingGenerator.java
Date Tue, 01 Apr 2003 07:28:38 GMT
antelder    2003/03/31 23:28:37

  Modified:    java/src/org/apache/wsif/tools/wsdl
                        SOAPJMSBindingGenerator.java
                        JavaBindingGenerator.java EJBBindingGenerator.java
                        ModelBindingGenerator.java
  Log:
  Change binding generators to know about their binding extensability element class
  
  Revision  Changes    Path
  1.2       +11 -0     xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/SOAPJMSBindingGenerator.java
  
  Index: SOAPJMSBindingGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/SOAPJMSBindingGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SOAPJMSBindingGenerator.java	31 Mar 2003 12:51:11 -0000	1.1
  +++ SOAPJMSBindingGenerator.java	1 Apr 2003 07:28:37 -0000	1.2
  @@ -86,6 +86,9 @@
       // name of this BindingGenerators binding type
       protected static String soapjmsBindingTypeName = "soapjms";
   
  +    // implemeted Binding class
  +    protected Class implementedBinding = SOAPBinding.class;
  +
       /**
        * Construct a new binding generator
        */
  @@ -98,6 +101,14 @@
        */
       public SOAPJMSBindingGenerator() {
           super(soapjmsBindingTypeName);
  +    }
  +
  +    /**
  +     * Returns the implemetedBinding.
  +     * @return Class
  +     */
  +    public Class getImplementedBinding() {
  +        return implementedBinding;
       }
   
       /**
  
  
  
  1.2       +7 -11     xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/JavaBindingGenerator.java
  
  Index: JavaBindingGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/JavaBindingGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaBindingGenerator.java	31 Mar 2003 12:51:11 -0000	1.1
  +++ JavaBindingGenerator.java	1 Apr 2003 07:28:37 -0000	1.2
  @@ -90,6 +90,9 @@
       // name of this BindingGenerators binding type
       protected static String javaBindingTypeName = "java";
   
  +    // implemeted Binding class
  +    protected Class implementedBinding = JavaBinding.class;
  +
       /**
        * Construct a new binding generator
        */
  @@ -105,18 +108,11 @@
       }
   
       /**
  -     * Dont add a Javabinding for an existing Java binding
  +     * Returns the implemetedBinding.
  +     * @return Class
        */
  -    protected boolean isNewBindingRequired(Port port) {
  -        boolean wanted = true;
  -        Binding b = port.getBinding();
  -        List extEls = b.getExtensibilityElements();
  -        for (Iterator i = extEls.iterator(); wanted && i.hasNext();) {
  -            if (i.next() instanceof JavaBinding) {
  -                wanted = false;
  -            }
  -        }
  -        return wanted;
  +    public Class getImplementedBinding() {
  +        return implementedBinding;
       }
   
       /**
  
  
  
  1.2       +7 -11     xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/EJBBindingGenerator.java
  
  Index: EJBBindingGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/EJBBindingGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJBBindingGenerator.java	31 Mar 2003 12:51:11 -0000	1.1
  +++ EJBBindingGenerator.java	1 Apr 2003 07:28:37 -0000	1.2
  @@ -90,6 +90,9 @@
       // name of this BindingGenerators binding type
       protected static String ejbBindingTypeName = "ejb";
   
  +    // implemeted Binding class
  +    protected Class implementedBinding = EJBBinding.class;
  +
       /**
        * Construct a new binding generator
        */
  @@ -98,18 +101,11 @@
       }
   
       /**
  -     * Dont add an EJBBinding for an existing EJBBinding
  +     * Returns the implemetedBinding.
  +     * @return Class
        */
  -    protected boolean isNewBindingRequired(Port port) {
  -        boolean wanted = true;
  -        Binding b = port.getBinding();
  -        List extEls = b.getExtensibilityElements();
  -        for (Iterator i = extEls.iterator(); wanted && i.hasNext();) {
  -            if (i.next() instanceof EJBBinding) {
  -                wanted = false;
  -            }
  -        }
  -        return wanted;
  +    public Class getImplementedBinding() {
  +        return implementedBinding;
       }
   
       /**
  
  
  
  1.2       +17 -1     xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/ModelBindingGenerator.java
  
  Index: ModelBindingGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/tools/wsdl/ModelBindingGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ModelBindingGenerator.java	31 Mar 2003 12:51:11 -0000	1.1
  +++ ModelBindingGenerator.java	1 Apr 2003 07:28:37 -0000	1.2
  @@ -73,6 +73,7 @@
   import javax.wsdl.Port;
   import javax.wsdl.PortType;
   import javax.wsdl.Service;
  +import javax.wsdl.extensions.ExtensibilityElement;
   import javax.xml.namespace.QName;
   
   import org.apache.wsif.providers.ProviderUtils;
  @@ -155,8 +156,23 @@
        * Is a new binding required for a Port
        */
       protected boolean isNewBindingRequired(Port port) {
  -        return true;
  +        boolean wanted = true;
  +        Binding b = port.getBinding();
  +        Class bindingType = getImplementedBinding();
  +        List extEls = b.getExtensibilityElements();
  +        for (Iterator i = extEls.iterator(); wanted && i.hasNext();) {
  +        	ExtensibilityElement ee = (ExtensibilityElement) i.next();
  +            if (bindingType.isAssignableFrom(ee.getClass())) {
  +                wanted = false;
  +            }
  +        }
  +        return wanted;
       }
  +
  +    /**
  +     * Get the class of the extensibility element the generator supports
  +     */
  +    abstract public Class getImplementedBinding();
   
       /**
        * Add any new namespaces to the Definition
  
  
  

Mime
View raw message