Examples of JBossWSToolsException


Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

      {
            //validate the inputs
            WSDLInterfaceOperationInput wiarr1[] = w1.getInputs();
            WSDLInterfaceOperationInput wiarr2[] = w2.getInputs();
            if(wiarr1.length != wiarr2.length)
               throw new JBossWSToolsException("Number of WSDLInterfaceOperationInput mismatch");
            int len = wiarr1.length;
            for(int i = 0 ; i < len; i ++)
            {
               bool = validateInterfaceOperationInput(wiarr1[i],wiarr2[i]);
               if(!bool) return bool;
            }
            //validate the outputs
            WSDLInterfaceOperationOutput woarr1[] = w1.getOutputs();
            WSDLInterfaceOperationOutput woarr2[] = w2.getOutputs();
            if(woarr1.length != woarr2.length)
               throw new JBossWSToolsException("Number of WSDLInterfaceOperationInput mismatch");
            len = woarr1.length;
            for(int i = 0 ; i < len; i ++)
            {
               bool = validateInterfaceOperationOutput(woarr1[i],woarr2[i]);
               if(!bool) return bool;
            }
            //validate the faults
            WSDLInterfaceOperationInfault[] inf1 = w1.getInfaults();
            WSDLInterfaceOperationInfault[] inf2 = w2.getInfaults();
            if( (inf1 != null && inf2 == null) ||
                 (inf1 == null && inf2 != null) )
                 throw new JBossWSToolsException("Infaults mismatch for operation:"+w1.getName());
            if(inf1.length != inf2.length)
                 throw new JBossWSToolsException("Number of Infaults mismatch for operation:"+w1.getName());
           
            len = inf1.length;
            for(int i=0; i< len; i++)
            {
               bool = checkQNameEquality(inf1[i].getRef(),inf2[i].getRef());
               if(bool)
                  bool = checkStringEquality(inf1[i].getMessageLabel(),inf2[i].getMessageLabel());
               if(bool == false) return bool;
            }
             
            WSDLInterfaceOperationOutfault[] outf1 = w1.getOutfaults();
            WSDLInterfaceOperationOutfault[] outf2 = w2.getOutfaults();
            if( (outf1 != null && outf2 == null) ||
                 (outf1 == null && outf2 != null) )
                 throw new JBossWSToolsException("Outfaults mismatch for operation:"+w1.getName());
            if(outf1.length != outf2.length)
               throw new JBossWSToolsException("Number of Infaults mismatch for operation:"+w1.getName());
           
            len = outf1.length;
            for(int i=0; i< len; i++)
            {
               bool = checkQNameEquality(outf1[i].getRef(),outf2[i].getRef());
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

      boolean bool = false;
      QName xmlName1 = i1.getElement();
      QName xmlName2 = i2.getElement();
      bool = checkQNameEquality(xmlName1,xmlName2);
      if(bool == false)
         throw new JBossWSToolsException(xmlName1 + " & " + xmlName2 + " mismatch");
      bool = validateExtensibilityElements(i1, i2);
      if(bool == false)
         throw new JBossWSToolsException("WSDLExtensibilityElement mismatch");
      return bool;
   }
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

   throws JBossWSToolsException
   {
      boolean bool = false;
      if((barr1 == null && barr2 != null) ||
            (barr1 != null && barr2 == null))
         throw new JBossWSToolsException("Mismatch in the Binding Operations");
      if(barr1.length != barr2.length)
         throw new JBossWSToolsException("Mismatch in number of Binding Operations");
     
      int len = barr1.length;
     
      for(int i=0; i< len; i++)
      {
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

      bool = checkQNameEquality(b1.getRef(),b2.getRef());
      WSDLBindingOperationInput[] wb1 = b1.getInputs();
      WSDLBindingOperationInput[] wb2 = b2.getInputs();
     
      if(wb1.length != wb2.length)
         throw new JBossWSToolsException("Mismatch in the number of inputs for binding op:"+bname);
     
      int len = wb1.length;
      for(int i=0; i< len; i++)
      {
         WSDLBindingOperationInput bindin1 = wb1[i];
         WSDLBindingOperationInput bindin2 = wb2[i];
         bool = checkStringEquality(bindin1.getMessageLabel(),bindin2.getMessageLabel());
         bool = bool & validateExtensibilityElements(bindin1, bindin2);
         if(!bool) return bool;
      }
     
      WSDLBindingOperationOutput[] wboutarr1 = b1.getOutputs();
      WSDLBindingOperationOutput[] wboutarr2 = b2.getOutputs();
     
      if(wboutarr1.length != wboutarr2.length)
         throw new JBossWSToolsException("Mismatch in the number of outputs for binding op:"+bname);
     
      len = wboutarr1.length;
      for(int i=0; i< len; i++)
      {
         WSDLBindingOperationOutput bindout1 = wboutarr1[i];
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

   private static boolean validateWSDLEndpoints(WSDLEndpoint[] warr1, WSDLEndpoint[] warr2)
   throws JBossWSToolsException
   {
      boolean bool = false;
      if(warr1 == null || warr1.length == 0)
         throw new JBossWSToolsException("Number of endpoints in first wsdl is null");
      if(warr2 == null || warr2.length == 0)
         throw new JBossWSToolsException("Number of endpoints in second wsdl is null");
      int len = warr1.length;
      for(int i=0; i< len;i++)
      {
         WSDLEndpoint e1 = warr1[i];
         WSDLEndpoint e2 = warr2[i];
         String add1 = e1.getAddress();
         String add2 = e2.getAddress();
         if(add1.equals(add2) == false)
            throw new JBossWSToolsException("Endpoint addresses do not match");
         bool = checkQNameEquality(e1.getBinding(),e2.getBinding());
         if(bool == false)
            throw new JBossWSToolsException("Endpoint binding do not match");
         bool = checkQNameEquality(e1.getName(),e2.getName());
         if(bool == false)
            throw new JBossWSToolsException("Endpoint Names do not match");
         bool = bool && validateExtensibilityElements(e1, e2);
      }
      return bool;
   }
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

   boolean bool = true;
      WSDLBinding[] bindings1 = w1.getBindings();
      WSDLBinding[] bindings2 = w2.getBindings();
      if (bindings1 == null || bindings1.length == 0)
      {
         throw new JBossWSToolsException("bindings in first wsdl cannot be null");
      }
      if(bindings2 == null || bindings2.length == 0)
      {
         throw new JBossWSToolsException("bindings in second wsdl cannot be null");
      }
      if(bindings1.length != bindings2.length)
         throw new JBossWSToolsException("Mismatch in the number of bindings");
     
      for (int i = 0; i < bindings1.length; i++)
      {
         WSDLBinding binding1 = bindings1[i];
         WSDLBinding binding2 = bindings2[i];
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

     
      WSDLInterface[] wiarr1 = w1.getInterfaces();
      WSDLInterface[] wiarr2 = w2.getInterfaces();
     
      if(wiarr1.length != wiarr2.length)
         throw new JBossWSToolsException("Number of interfaces mismatch");
     
      int len = wiarr1.length;
     
      for(int i = 0; i < len; i++)
      {
         WSDLInterface wi1 = wiarr1[i];
         WSDLInterface wi2 = wiarr2[i];
         if(checkQNameEquality(wi1.getName(),wi2.getName()) == false)
            throw new JBossWSToolsException("Interface mismatch");
         WSDLInterfaceOperation[] wioparr1 = wi1.getOperations();
         WSDLInterfaceOperation[] wioparr2 = wi2.getOperations();
        
         if(wioparr1.length != wioparr2.length)
            throw new JBossWSToolsException("Number of Interface Operations mismatch");
         int innerlen = wioparr1.length;
         for(int j = 0 ; j< innerlen; j++)
         {
            bool = validateInterfaceOperation(wioparr1[j],wioparr2[j]);
            if(bool == false)
               throw new JBossWSToolsException("validation Interface Operations failed");
         }
      }
      return bool;
   }
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

   throws JBossWSToolsException
   {
      String ts1 = w1.getTargetNamespace();
      String ts2 = w2.getTargetNamespace();
      if(ts1 == null || ts1.equals(""))
         throw new JBossWSToolsException("Target Namespaces 1 is null");
      if(ts2 == null || ts2.equals(""))
         throw new JBossWSToolsException("Target Namespaces 2 is null");
      if(ts1.equals(ts2) == false)
         throw new JBossWSToolsException("Target Namespaces do not match");
     
      Iterator iter1 = w1.getRegisteredPrefix();
     
      /**
       * IDEA: We get a namespace from the first wsdl and check that it is defined
       * in the other wsdl, irrespective of the prefix match
       */
      while(iter1.hasNext())
      {
         String prefix1 = (String)iter1.next();
        
         String ns = w1.getNamespaceURI(prefix1);
        
         //Ignore the namespaces that are generated by wscompile for arrays
         if(ns.indexOf("arrays") > -1 )
            continue;
        
         String prefix2 = w2.getPrefix(ns);
        
         if(prefix2 == null)
            throw new JBossWSToolsException("Namespace " + ns + " not defined in the second wsdl");   
      }
     
      //Lets check the prefixes and namespaces
      /*while(iter1.hasNext() && iter2.hasNext())
      {
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

      boolean bool = false;
      WSDLService[] services1 = w1.getServices();
      WSDLService[] services2 = w2.getServices();
      if (services1 == null || services1.length == 0)
      {
         throw new JBossWSToolsException("services in first wsdl cannot be null");
      }
      if(services2 == null || services2.length == 0)
      {
         throw new JBossWSToolsException("services in second wsdl cannot be null");
      }
      if(services1.length != services2.length)
         throw new JBossWSToolsException("Mismatch in the number of services");
     
      for (int i = 0; i < services1.length; i++)
      {
         WSDLService s1 = services1[i];
         WSDLService s2 = services2[i];
View Full Code Here

Examples of org.jboss.ws.tools.exceptions.JBossWSToolsException

      {
            //validate the inputs
            WSDLInterfaceOperationInput wiarr1[] = w1.getInputs();
            WSDLInterfaceOperationInput wiarr2[] = w2.getInputs();
            if(wiarr1.length != wiarr2.length)
               throw new JBossWSToolsException("Number of WSDLInterfaceOperationInput mismatch");
            int len = wiarr1.length;
            for(int i = 0 ; i < len; i ++)
            {
               bool = validateInterfaceOperationInput(wiarr1[i],wiarr2[i]);
               if(!bool) return bool;
            }
            //validate the outputs
            WSDLInterfaceOperationOutput woarr1[] = w1.getOutputs();
            WSDLInterfaceOperationOutput woarr2[] = w2.getOutputs();
            if(woarr1.length != woarr2.length)
               throw new JBossWSToolsException("Number of WSDLInterfaceOperationInput mismatch");
            len = woarr1.length;
            for(int i = 0 ; i < len; i ++)
            {
               bool = validateInterfaceOperationOutput(woarr1[i],woarr2[i]);
               if(!bool) return bool;
            }
            //validate the faults
            WSDLInterfaceOperationInfault[] inf1 = w1.getInfaults();
            WSDLInterfaceOperationInfault[] inf2 = w2.getInfaults();
            if( (inf1 != null && inf2 == null) ||
                 (inf1 == null && inf2 != null) )
                 throw new JBossWSToolsException("Infaults mismatch for operation:"+w1.getName());
            if(inf1.length != inf2.length)
                 throw new JBossWSToolsException("Number of Infaults mismatch for operation:"+w1.getName());
           
            len = inf1.length;
            for(int i=0; i< len; i++)
            {
               bool = checkQNameEquality(inf1[i].getRef(),inf2[i].getRef());
               if(bool)
                  bool = checkStringEquality(inf1[i].getMessageLabel(),inf2[i].getMessageLabel());
               if(bool == false) return bool;
            }
             
            WSDLInterfaceOperationOutfault[] outf1 = w1.getOutfaults();
            WSDLInterfaceOperationOutfault[] outf2 = w2.getOutfaults();
            if( (outf1 != null && outf2 == null) ||
                 (outf1 == null && outf2 != null) )
                 throw new JBossWSToolsException("Outfaults mismatch for operation:"+w1.getName());
            if(outf1.length != outf2.length)
               throw new JBossWSToolsException("Number of Infaults mismatch for operation:"+w1.getName());
           
            len = outf1.length;
            for(int i=0; i< len; i++)
            {
               bool = checkQNameEquality(outf1[i].getRef(),outf2[i].getRef());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.