Package org.uddi.api_v3

Examples of org.uddi.api_v3.DiscardAuthToken


         * This kills any authentication tokens, logs the user out and nulls out
         * all services
         */
        public void die() {
                if (token != null && security != null) {
                        DiscardAuthToken da = new DiscardAuthToken();
                        da.setAuthInfo(token);
                        try {
                                security.discardAuthToken(da);
                        } catch (Exception ex) {
                                HandleException(ex);
                        }
View Full Code Here


                        UDDISecurityPortType security = null;
                        UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
                        Transport transport = clerkManager.getTransport();
                        security = transport.getUDDISecurityService();

                        DiscardAuthToken getAuthTokenRoot = new DiscardAuthToken();
                        getAuthTokenRoot.setAuthInfo(authtoken);
                        security.discardAuthToken(getAuthTokenRoot);
                        System.out.println("Success!");
                }

                if (input.equals("22")) {
View Full Code Here

                        BusinessList findBusiness = GetBusinessList(token);
                        PrintBusinessInfo(findBusiness.getBusinessInfos());
                        PrintBusinessDetails(findBusiness.getBusinessInfos(), token);
                        PrintServiceDetailsByBusiness(findBusiness.getBusinessInfos(), token);

                        security.discardAuthToken(new DiscardAuthToken(token));

                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
View Full Code Here

      BusinessDetail  result = inquiry.getBusinessDetail(body);
      Assert.fail("No business should be found");
      System.out.println(result.getBusinessEntity().size());
    } catch (Exception e) {
      try {
        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(e);
        assertNotNull(report);
        assertTrue(report.countainsErrorCode(DispositionReport.E_INVALID_KEY_PASSED));
      } catch (Exception e1) {
        Assert.fail("We only expect DispositionReportFaultMessage, not " + e1.getClass());
        logger.error(e.getMessage(), e1);
      }
    }
View Full Code Here

     *
     * @param e the Exception at hang
     * @return DispositionReport if one can be found, or null if it is not.
     */
    public static DispositionReport getDispositionReport(Exception e) {
      DispositionReport report = null;
      if (e instanceof DispositionReportFaultMessage) {
        DispositionReportFaultMessage faultMsg = (DispositionReportFaultMessage) e;
        report = faultMsg.getFaultInfo();
      } else if (e instanceof SOAPFaultException) {
        SOAPFaultException soapFault = (SOAPFaultException) e;
        Detail detail = soapFault.getFault().getDetail();
        if (detail.getFirstChild()!=null) {
          try {
            report =  new DispositionReport(detail.getFirstChild());
          } catch (JAXBException je) {
            log.error("Could not unmarshall detail to a DispositionReport");
          }
        }
      } else if (e instanceof UndeclaredThrowableException) {
View Full Code Here

      Assert.fail("No exception should be thrown.");
    }
  }
  public void findBinding() {
    try {
      FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3");
      BindingDetail result = inquiry.findBinding(body);
      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
View Full Code Here

     
      try {
        int size = 0;
        BusinessList bl = null;
 
        FindBusiness fbb = new FindBusiness();
        TModelBag tmb = new TModelBag();
        tmb.getTModelKey().add(TOM_PUBLISHER_TMODEL01_KEY);
        fbb.setTModelBag(tmb);
        bl = inquiry.findBusiness(fbb);
        size = bl.getBusinessInfos().getBusinessInfo().size();
        if (size != 1) {
          Assert.fail("Should have found one entry on FindBusiness with TModelBag, "
              + "found " + size);
View Full Code Here

    this.inquiry = inquiry;
  }

  public void findBusiness() {
    try {
      FindBusiness body = (FindBusiness)EntityCreator.buildFromDoc(FIND_BUSINESS_XML, "org.uddi.api_v3");
      BusinessList result = inquiry.findBusiness(body);
      if (result == null)
        Assert.fail("Null result from find business operation");
      BusinessInfos bInfos = result.getBusinessInfos();
      if (bInfos == null)
View Full Code Here

    }
  }
 
  public void findAllBusiness() {
    try {
      FindBusiness body = (FindBusiness)EntityCreator.buildFromDoc(FIND_ALL_BUSINESSES_XML, "org.uddi.api_v3");
      BusinessList result = inquiry.findBusiness(body);
      if (result == null)
        Assert.fail("Null result from find business operation");
      BusinessInfos bInfos = result.getBusinessInfos();
      if (bInfos == null)
View Full Code Here

    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    String lang = request.getLocale().getLanguage();
    FindResponse response = new FindResponse();
    try {
      FindBusiness findBusiness = new FindBusiness();
      FindQualifiers findQualifiers = new FindQualifiers();
      for (String string : findQualifyers) {
        findQualifiers.getFindQualifier().add(string);
      }
      findBusiness.setFindQualifiers(findQualifiers);

      Name name = new Name();
      name.setValue(nameStr);
      findBusiness.getName().add(name);


      logger.debug("FindBusiness " + findBusiness + " sending findBusinesses request..");
      List<Business> businesses = new ArrayList<Business>();
     
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.DiscardAuthToken

Copyright © 2018 www.massapicom. 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.