Package org.apache.juddi.v3.client.config

Examples of org.apache.juddi.v3.client.config.UDDIClerk$WSDL


    public void Test2_NoAutoRegisterAndShortCircuitReceive() throws Exception {
        log.info("Test2_NoAutoRegisterAndShortCircuitReceive");
        Test2_NoAutoRegisterAndShortCircuitReceive_ = false;
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");
        // TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:org.apache.juddi:test:keygenerator", "Test domain", "en");
        //clerk.register(createKeyGenator);
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        Assert.assertNotNull(start);
        //Assert.assertNotNull(start.getBindingKey());
View Full Code Here


    @Test(expected = ServiceAlreadyStartedException.class)
    public void Test3_StartWhenAlreadyStarted() throws Exception {
        log.info("Test3_StartWhenAlreadyStarted");
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");
        // TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:org.apache.juddi:test:keygenerator", "Test domain", "en");
        //clerk.register(createKeyGenator);
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        try {
            BindingTemplate start1 = SubscriptionCallbackListener.start(c, "default");
View Full Code Here

        log.info("Test4_NotifyEndpointStopped");
        //reset
        Test4_NotifyEndpointStopped_ = false;
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");

        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        SubscriptionCallbackListener.registerCallback(this);

        SubscriptionCallbackListener.stop(c, "default", null);
View Full Code Here

  public void testDirectCall() throws ConfigurationException, WSDLException, RemoteException, TransportException, MalformedURLException, Exception {
    try {
      tckTModel.saveJoePublisherTmodel(authInfoJoe);
      tckBusiness.saveJoePublisherBusiness(authInfoJoe);
     
      UDDIClerk clerk = new UDDIClient("META-INF/uddi.xml").getClerk("joe");
      Properties properties = clerk.getUDDINode().getProperties();
      URLLocalizer urlLocalizer = new URLLocalizerDefaultImpl();
     
      //get the wsdl
      Definition wsdlDefinition = new ReadWSDL().readWSDL("wsdl/sample.wsdl");
      //set required properties
View Full Code Here

  public void testClerkCall() throws ConfigurationException, WSDLException, RemoteException, TransportException, MalformedURLException {
    try {
      tckTModel.saveJoePublisherTmodel(authInfoJoe);
      tckBusiness.saveJoePublisherBusiness(authInfoJoe);
     
      UDDIClerk clerk = new UDDIClient("META-INF/uddi.xml").getClerk("joe");
      clerk.registerWsdls();
     
     
      String portTypeName = "StockQuotePortType";
      String namespace    = "http://example.com/stockquote/";
      FindTModel findTModelForPortType = WSDL2UDDI.createFindPortTypeTModelForPortType(portTypeName, namespace);
      System.out.println(new PrintUDDI<FindTModel>().print(findTModelForPortType));
     
      clerk.unRegisterWsdls();
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail();
    } finally {
      tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
View Full Code Here

public class Call {
 
  public void call() {
    try {
      UDDIClient uddiClient = new UDDIClient("META-INF/wsdl2uddi-uddi.xml");
      UDDIClerk clerk = uddiClient.getClerk("joe");
         
          //find the service in the UDDI registry
          System.out.println("The clientside of a runtime lookup usually knows the serviceKey.");
          System.out.println("To get updated binding information you should use the ServiceLocator with a live cache.");
          String helloWorldServiceKey = "uddi:uddi.joepublisher.com:service_helloworld";
View Full Code Here

   
    System.out.println("2. Programmatically publish the endpoint to UDDI");
    Publish sp = new Publish();
    try {
      uddiClient = new UDDIClient("META-INF/wsdl2uddi-uddi.xml");
      UDDIClerk clerk = uddiClient.getClerk("joe");
     
      System.out.println("setting up the publisher");
      sp.setupJoePublisher(clerk);
      System.out.println("publish the business");
      sp.publishBusiness(clerk);
View Full Code Here

  public static void main (String args[]) {
   
    Delete sp = new Delete();
    try {
      uddiClient = new UDDIClient("META-INF/wsdl2uddi-uddi.xml");
      UDDIClerk clerk = uddiClient.getClerk("joe");
     
      sp.deleteWSDL(clerk);
      sp.deleteBusiness(clerk);
     
    } catch (Exception e) {
View Full Code Here

public class Find {
 
  public void find() {
    try {
      UDDIClient uddiClient = new UDDIClient("META-INF/wsdl2uddi-uddi.xml");
      UDDIClerk clerk = uddiClient.getClerk("joe");
         
      System.out.println("Do a find business using the businessKey uddi:uddi.joepublisher.com:business_wsdl-business");
          BusinessEntity businessEntity = clerk.findBusiness("uddi:uddi.joepublisher.com:business_wsdl-business");
          //
         
          if (businessEntity!=null) {
            System.out.println("Found business with name " + businessEntity.getName().get(0).getValue());
            System.out.println("Number of services: " + businessEntity.getBusinessServices().getBusinessService().size());
View Full Code Here

    public static void main(String[] args) throws Exception {

        // create a manager and read the config in the archive;
        // you can use your config file name
        UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
        UDDIClerk clerk = clerkManager.getClerk("default");
        // a ClerkManager can be a client to multiple UDDI nodes, so
        // supply the nodeName (defined in your uddi.xml.
        // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
        Transport transport = clerkManager.getTransport();
        // Now you create a reference to the UDDI API
        security = transport.getUDDISecurityService();
        publish = transport.getUDDIPublishService();
        inquiry = transport.getUDDIInquiryService();
        //step one, get a token
        GetAuthToken getAuthTokenRoot = new GetAuthToken();
        getAuthTokenRoot.setUserID("uddi");
        getAuthTokenRoot.setCred("uddi");

        // Making API call that retrieves the authentication token for the 'root' user.
        String rootAuthToken = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
        String uddi = security.getAuthToken(getAuthTokenRoot).getAuthInfo();

        System.out.println("killing mary's business if it exists");
        //first check is Mary's business exists and delete
        DeleteIfExists("uddi:uddi.marypublisher.com:marybusinessone", uddi);
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.config.UDDIClerk$WSDL

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.