Package org.apache.juddi.v3.client.mapping.wsdl

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDL2UDDI


  public void setClerkAuthenticationTokensInSession(String username) throws ConfigurationException {
   
    HttpServletRequest request = getThreadLocalRequest();
    HttpSession session = request.getSession();
    //upon success obtain tokens from other registries
    UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
    Map<String, UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
    for (UDDIClerk clerk : clerks.values()) {
      //only setting token for the clerks of the current user/publisher
      if (username.equals(clerk.getPublisher())) {
        try {
          if (session.getAttribute("token-" + clerk.getName())==null) {
View Full Code Here


    logger.debug("Publisher " + publisher + " sending getSubscription request..");
    try {
      boolean isMatchingClerk=false;
      UDDIClerk toClerk = null;
      UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
      UDDINode homeNode = WebHelper.getUDDIHomeNode(session.getServletContext());
      Map<String, UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
      for (UDDIClerk clerk : clerks.values()) {
        if (publisher.equals(clerk.getPublisher())
            && homeNode.getName().equals(clerk.getUDDINode().getName())) {
          toClerk = clerk;
        }
      }
      for (UDDIClerk clerk : clerks.values()) {
        if (publisher.equals(clerk.getPublisher())) {
View Full Code Here

  }

  private Node getSubscriptions(HttpSession session, UDDIClerk clerk, UDDIClerk toClerk) {

    Node modelNode = new Node();
    UDDINode node = clerk.getUDDINode();
    modelNode.setName(node.getName());
    modelNode.setClerkName(clerk.getName());
    modelNode.setDescription(node.getDescription());
    try {
      UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(clerk.getManagerName());
      String clazz = manager.getClientConfig().getUDDINode(clerk.getUDDINode().getName()).getProxyTransport();
      Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
      Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(clerk.getManagerName(),clerk.getUDDINode().getName())
View Full Code Here

    logger.info("Sending saveSubscriptions request..");
    try {
      //before sending this we need to ready the listener node
      UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
      UDDINode homeNode = WebHelper.getUDDIHomeNode(session.getServletContext());
      UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
      UDDIClerk toClerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getToClerkName());
      if (toClerk==null) {
        String publisher = (String) session.getAttribute("UserName");
        Map<String, UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
        for (UDDIClerk uddiClerk : clerks.values()) {
          if (publisher.equals(uddiClerk.getPublisher())
              && homeNode.getName().equals(uddiClerk.getUDDINode().getName())) {
            toClerk = uddiClerk;
          }
        }
      }
     
View Full Code Here

        registrationInfo.setPortName(portName);
        registrationInfo.setServiceUrl(serviceUrl);
        registrationInfo.setWsdlUrl(wsdlURL);
        registrationInfo.setWsdlDefinition(wsdlDefinition);
        registrationInfo.setRegistrationType(RegistrationType.BPEL);
        registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
        Thread thread = new Thread(registration);
        thread.start();
      } catch (Exception e) {
        log.error("Unable to register service " + serviceQName
            + " ." + e.getMessage(),e);
View Full Code Here

   * @param wsdlRef
   */
  public void unRegisterBPELEPR(QName serviceName, String portName, URL serviceURL) {
    if (selfRegister) {
      try {
        BPEL2UDDI bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
        String serviceKey = bpel2UDDI.unRegister(serviceName, portName, serviceURL);
        if (registration.getServiceLocator(bpelClerk.getName())!=null) {
          registration.getServiceLocator(bpelClerk.getName()).removeService(serviceKey);
        }
      } catch (Exception e) {
        log.error("Unable to unRegister EPR for " + serviceName
View Full Code Here

  public void registerBPELProcess(QName serviceQName, String version, String portName, URL serviceUrl,
      URL wsdlURL, Definition wsdlDefinition) {
    if (selfRegister) {
     
      try {
        RegistrationInfo registrationInfo = new RegistrationInfo();
        registrationInfo.setServiceQName(serviceQName);
        registrationInfo.setVersion(version);
        registrationInfo.setPortName(portName);
        registrationInfo.setServiceUrl(serviceUrl);
        registrationInfo.setWsdlUrl(wsdlURL);
        registrationInfo.setWsdlDefinition(wsdlDefinition);
        registrationInfo.setRegistrationType(RegistrationType.BPEL);
        registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
        Thread thread = new Thread(registration);
        thread.start();
      } catch (Exception e) {
        log.error("Unable to register service " + serviceQName
View Full Code Here

                                properties.put("keyDomain", "domain");
                                properties.put("businessName", "biz");
                                properties.put("serverName", "localhost");
                                properties.put("serverPort", "80");

                                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
                                BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
                                for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
                                        if (businessServices.getBusinessService().get(i).getBindingTemplates() != null) {
                                                for (int k = 0; k < businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().size(); k++) {
                                                        items.addAll(ParseBinding(businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().get(k), null));
                                                }
View Full Code Here

 
  public void publishAndRegisterHttpCallbackEndpoint() throws BindException {
    if (clerk!=null && listenerEndpoint==null) {
      try {
        listenerServiceUrl = new URL(urlLocalizer.rewrite(new URL(DEFAULT_SUBSCRIPTION_LISTENER_URL)));
        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(clerk, urlLocalizer, properties);
        Definition wsdlDefinition = new ReadWSDL().readWSDL("org/apache/juddi/v3/client/mapping/UDDIClientSubscriptionListener.wsdl");
       
        String bindingKey = wsdl2UDDI.registerBusinessService(
            SUBSCRIPTION_LISTENER_SERVICE_NAME,
            SUBSCRIPTION_LISTENER_PORT_NAME, listenerServiceUrl, wsdlDefinition).getBindingKey();
        UDDISubscriptionListenerPortType subscriptionListener = new UDDIClientSubscriptionListenerImpl(bindingKey, this);
        log.info("Bringing up a UDDIClientSubscriptionListenerImpl on Endpoint " + listenerServiceUrl.toExternalForm());
        listenerEndpoint = Endpoint.create(subscriptionListener);
View Full Code Here

    if (subscriptionKey!=null) {
      clerk.unRegisterSubscription(subscriptionKey);
    }
    if (listenerEndpoint!=null) {
      listenerEndpoint.stop();
      WSDL2UDDI wsdl2UDDI;
      try {
        wsdl2UDDI = new WSDL2UDDI(clerk, urlLocalizer, properties);
        wsdl2UDDI.unRegisterBusinessService(
            SUBSCRIPTION_LISTENER_SERVICE_NAME,
            SUBSCRIPTION_LISTENER_PORT_NAME, listenerServiceUrl);
      } catch (Exception e) {
        /* we did our best*/
        log.debug(e.getMessage(),e);
 
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.mapping.wsdl.WSDL2UDDI

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.