Examples of BindingTemplate


Examples of org.uddi.api_v3.BindingTemplate

                ss.setAuthInfo(authInfoJoe);
                BusinessService bs = new BusinessService();
                bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
                bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bs.setBindingTemplates(new BindingTemplates());
                BindingTemplate bt = new BindingTemplate();
                bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);
View Full Code Here

Examples of org.uddi.api_v3.BindingTemplate

                ss.setAuthInfo(authInfoJoe);
                BusinessService bs = new BusinessService();
                bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
                bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bs.setBindingTemplates(new BindingTemplates());
                BindingTemplate bt = new BindingTemplate();
                bt.setBindingKey(null);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);
View Full Code Here

Examples of org.uddi4j.datatype.binding.BindingTemplate

          TModel tModel = null;

          if (uddiReference.getKeyType().equals(UDDIReference.BINDING_KEY)) {
              BindingDetail bindingDetail = uddiProxy.get_bindingDetail(
                      uddiReference.getKey());
              BindingTemplate bindingTemplate = (BindingTemplate) bindingDetail.
                      getBindingTemplateVector().elementAt(0);
              tModel = UDDIUtils.findTModel(uddiProxy, bindingTemplate, false);
          } else { // UDDIReference.TMODEL_KEY
              TModelDetail tModelDetail = uddiProxy.get_tModelDetail(
                          uddiReference.getKey());
View Full Code Here

Examples of org.uddi4j.datatype.binding.BindingTemplate

    String serviceLocation = null;

    result = AssertionResult.RESULT_PASSED;

    // Get the bindingTemplate from the entryContext
    BindingTemplate bindingTemplate =
      (BindingTemplate) entryContext.getEntry().getEntryDetail();

    // If the bindingTemplate does not contain an accessPoint, then fail
    if ((bindingTemplate.getAccessPoint() == null)
      || ((serviceLocation = bindingTemplate.getAccessPoint().getText())
        == null))
    {
      result = AssertionResult.RESULT_FAILED;
      failureDetailMessage =
        "The bindingTempate key is: ["
          + bindingTemplate.getBindingKey()
          + "].";
    }

    // Else save the service location in the assertion result
    else
View Full Code Here

Examples of org.uddi4j.datatype.binding.BindingTemplate

    throws WSIException
  {
    result = AssertionResult.RESULT_PASSED;

    // Get the bindingTemplate from the entryContext
    BindingTemplate bindingTemplate =
      (BindingTemplate) entryContext.getEntry().getEntryDetail();

    boolean validService = false;
    boolean validBusiness = false;

    String serviceKey = null;
    String businessKey = null;
    try
    {
      serviceKey = bindingTemplate.getServiceKey();
      BusinessService service =
        UDDIUtils.getBusinessServiceByKey(this.validator.uddiProxy, serviceKey);

      businessKey = service.getBusinessKey();
      BusinessEntity business =
View Full Code Here

Examples of org.uddi4j.datatype.binding.BindingTemplate

   */
  public void validateArtifact() throws WSIException
  {
    Entry entry = null;

    BindingTemplate bindingTemplate = null;
    TModel tModel = null;

    // it depricated after refactoring
    // now the inner classes moved out from validator
    //String classPrefix = this.getClass().getName() + "$";
    String classPrefix = this.getClass().getPackage().getName()+".";

    try
    {
      // Set up a reference to the UDDI registry
      uddiProxy = new UDDIProxy();

      //new Socket(new InetAddress(uddiReference.getInquiryURL()));
      uddiProxy.setInquiryURL(uddiReference.getInquiryURL());
      boolean wasEx = false;
      InputStream stream;
      try
      {
        URL url = StringUtils.getURL(null, uddiReference.getInquiryURL());
        stream = url.openStream();
        stream.close();
      }

      catch (UnknownHostException ex)
      {
        wasEx = true;
      }

      catch (IOException ex)
      {
      }

      if (!wasEx)
      {

        // If the UDDI reference is to a bindingTemplate then get it
        if (uddiReference.getKeyType().equals(UDDIReference.BINDING_KEY))
        {
          // Get binding detail which will contain the bindingTemplate
          BindingDetail bindingDetail =
            uddiProxy.get_bindingDetail(uddiReference.getKey());

          // Get bindingTemplate
          bindingTemplate =
            (BindingTemplate) bindingDetail
              .getBindingTemplateVector()
              .elementAt(
              0);

          if (verboseOption)
          {
            System.err.println(
              "    BindingTemplate - "
                + UDDIUtils.bindingTemplateToString(bindingTemplate));
          }

          // Get the wsdlSpec tModel
          tModel = UDDIUtils.findTModel(uddiProxy, bindingTemplate,
                  verboseOption);
        }

        // Else it has to be a tModel
        else
        {
          TModelDetail tModelDetail =
            uddiProxy.get_tModelDetail(uddiReference.getKey());
          tModel = (TModel) tModelDetail.getTModelVector().elementAt(0);
        }

        if (verboseOption)
        {
          System.err.println(
            "    TModel specified or found in bindingTemplate - "
              + UDDIUtils.tModelToString(tModel));
        }
      }

      if (bindingTemplate == null)
      {
        setMissingInput(
          EntryType.getEntryType(TYPE_DISCOVERY_BINDINGTEMPLATE));
      }

      // If there is a bindingTemplate, then process test assertions for it
      else
      {
        // Create entry
        entry = this.reporter.getReport().createEntry();
        entry.setEntryType(
          EntryType.getEntryType(TYPE_DISCOVERY_BINDINGTEMPLATE));
        entry.setReferenceID(bindingTemplate.getBindingKey());
        entry.setEntryDetail(bindingTemplate);

        // Process test assertions
        processAssertions(
          classPrefix,
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.