Examples of MBBServices


Examples of org.corrib.s3b.mbb.service.types.MBBServices

  public void testMatchService() {
   
   
    for(CallTest ct : this.tests) {
      List<String> results = new ArrayList<String>();
      MBBServices matchedService = MBBServices.match(ct.getBaseUrl(), ct.getPreviousCall(), ct.getCall(), results, true);
     
      if(ct.getMatchedService() != matchedService)
        failNotEquals("Service test failed ["+ct.getId()+"]", ct.getMatchedService(), matchedService);
     
      if(ct.getMatchedService()!=null) {
View Full Code Here

Examples of org.corrib.s3b.mbb.service.types.MBBServices

  public void testMatchServiceCompound() {
   
   
    for(CallTest ct : this.compoundTests) {
      List<String> results = new ArrayList<String>();
      MBBServices matchedService = MBBServices.match(ct.getBaseUrl(), ct.getPreviousCall(), ct.getCall(), results, true);
     
      if(ct.getMatchedService() != matchedService)
        failNotEquals("Service test failed ["+ct.getId()+"]", ct.getMatchedService(), matchedService);
     
      if(ct.getMatchedService()!=null) {
View Full Code Here

Examples of org.corrib.s3b.mbb.service.types.MBBServices

   
  protected void testMatchServiceMeta(MBBServices mbbs, String type, String param) {
   
    for(CallTest ct : this.tests) {
      List<String> results = new ArrayList<String>();
      MBBServices matchedService = MBBServices.matchMeta(ct.getBaseUrl(),
                                 ct.getPreviousCall(),
                                 ct.getCall()+"/"+type+"/"+((param!=null)?param:""),
                                 results,
                                 true);
     
View Full Code Here

Examples of org.corrib.s3b.mbb.service.types.MBBServices

  public static final ServiceChain decode(String soaCall, String baseUrl) {
    List<MBBService> tmpchain = new ArrayList<MBBService>();
    MBBMetaService tmpmetaservice = null;
    String previousCall = "";
    List<String> params;
    MBBServices tmpmatchedService = null;
   
    while(true) {
      params = new ArrayList<String>();
      tmpmatchedService = MBBServices.match((baseUrl != null)?baseUrl:ConfigKeeper.getServiceUrl(), previousCall, soaCall, params, true);
     
      if(tmpmatchedService == null) {
        params = new ArrayList<String>();
        tmpmatchedService = MBBServices.matchMeta((baseUrl != null)?baseUrl:ConfigKeeper.getServiceUrl(), previousCall, soaCall, params, true);
      }
     
      if(tmpmatchedService != null && tmpmatchedService.getImplementation() != null) {

        MBBService mbbService;
        try {
          if(tmpmatchedService.isMeta()) {
            if(tmpmatchedService.getImplementation().equals(StatsMetaService.class) && params.size() > 7) {
              tmpmetaservice = StatsMetaService.get(params.get(7));
              tmpmetaservice.setParams(params);
            }else {
              try {
                Method get = tmpmatchedService.getImplementation().getMethod("get", String.class);
 
                if(params.size() > 1)
                  tmpmetaservice = (MBBMetaService)get.invoke(null, params.get(1));
                else
                  tmpmetaservice = (MBBMetaService)get.invoke(null, (String)null);

                tmpmetaservice.setParams(params);
              } catch (SecurityException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              } catch (NoSuchMethodException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              } catch (IllegalArgumentException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              } catch (InvocationTargetException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              }
             
            }
            break;
          }

          mbbService = tmpmatchedService.getImplementation().newInstance();
          mbbService.setParams(params);
         
          tmpchain.add(mbbService);
          try {
            if(mbbService instanceof AccessResourceService) {
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.