Package org.jboss.ws.metadata.wsdl

Examples of org.jboss.ws.metadata.wsdl.WSDLEndpoint


      if(warr2 == null || warr2.length == 0)
         throw new JBossWSToolsException("Number of endpoints in second wsdl is null");
      int len = warr1.length;
      for(int i=0; i< len;i++)
      {
         WSDLEndpoint e1 = warr1[i];
         WSDLEndpoint e2 = warr2[i];
         String add1 = e1.getAddress();
         String add2 = e2.getAddress();
         if(add1.equals(add2) == false)
            throw new JBossWSToolsException("Endpoint addresses do not match");
         bool = checkQNameEquality(e1.getBinding(),e2.getBinding());
         if(bool == false)
            throw new JBossWSToolsException("Endpoint binding do not match");
         bool = checkQNameEquality(e1.getName(),e2.getName());
         if(bool == false)
            throw new JBossWSToolsException("Endpoint Names do not match");
         bool = bool && validateExtensibilityElements(e1, e2);
      }
      return bool;
View Full Code Here


   {
      log.trace("processPort: " + srcPort.getName());

      Binding srcBinding = getDefinedBinding(srcPort);
      QName endpointName = new QName(srcWsdl.getTargetNamespace(), srcPort.getName());
      WSDLEndpoint destEndpoint = new WSDLEndpoint(destService, endpointName);
      destEndpoint.setBinding(srcBinding.getQName());
      destEndpoint.setAddress(getSOAPAddress(srcPort));
      processUnknownExtensibilityElements(srcPort, destEndpoint);

      if (processBinding(srcWsdl, srcBinding))
         destService.addEndpoint(destEndpoint);
   }
View Full Code Here

         appendUnknownExtensibilityElements(buffer, service);
         WSDLEndpoint[] endpoints = service.getEndpoints();
         int lenend = endpoints.length;
         for (int j = 0; j < lenend; j++)
         {
            WSDLEndpoint endpoint = endpoints[j];
            appendServicePort(buffer, endpoint);
         }

         buffer.append("</service>");
      }
View Full Code Here

   protected abstract void processTypes();

   protected void processEndpoint(WSDLService service, EndpointMetaData endpoint)
   {
      WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(service, endpoint.getPortName());
      String address = endpoint.getEndpointAddress();
      wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
      service.addEndpoint(wsdlEndpoint);

      QName interfaceQName = endpoint.getPortTypeName();
      WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
      wsdl.addInterface(wsdlInterface);

      // Add imports
      if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
      {
         WSDLImport wsdlImport = new WSDLImport(wsdl);
         wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
         wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      for (OperationMetaData operation : endpoint.getOperations())
      {
         processOperation(wsdlInterface, wsdlBinding, operation);
      }
View Full Code Here

   protected Map<String,String> packageNamespaceMap = new HashMap<String,String>();

   protected void processEndpoint(WSDLService service, EndpointMetaData endpoint)
   {
      WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(service, endpoint.getPortName());
      String address = endpoint.getEndpointAddress();
      wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
      service.addEndpoint(wsdlEndpoint);

      QName interfaceQName = endpoint.getPortTypeName();
      WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
      wsdl.addInterface(wsdlInterface);

      // Add imports
      if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
      {
         WSDLImport wsdlImport = new WSDLImport(wsdl);
         wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
         wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      if (extension)
         endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      if (endpoint.getDocumentation() != null)
      {
         String prefix = wsdl.getPrefix(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS);
         if (prefix == null)
View Full Code Here

   }

   public void testPortType()
   {
      WSDLService wsdlService = definitions.getService("AtmFrontEndService");
      WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(new QName("urn:samples:atm", "FrontEndPort"));
      assertEquals(new QName("urn:samples:atm2", "FrontEnd"), wsdlEndpoint.getInterface().getName());
   }
View Full Code Here

         appendUnknownExtensibilityElements(buffer, service);
         WSDLEndpoint[] endpoints = service.getEndpoints();
         int lenend = endpoints.length;
         for (int j = 0; j < lenend; j++)
         {
            WSDLEndpoint endpoint = endpoints[j];
            appendServicePort(buffer, endpoint);
         }

         buffer.append("</service>");
      }
View Full Code Here

   protected Map<String,String> packageNamespaceMap = new HashMap<String,String>();

   protected void processEndpoint(WSDLService service, EndpointMetaData endpoint)
   {
      WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(service, endpoint.getPortName());
      String address = endpoint.getEndpointAddress();
      wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
      service.addEndpoint(wsdlEndpoint);

      QName interfaceQName = endpoint.getPortTypeName();
      WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
      wsdl.addInterface(wsdlInterface);

      // Add imports
      if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
      {
         WSDLImport wsdlImport = new WSDLImport(wsdl);
         wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
         wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      if (extension)
         endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      if (endpoint.getDocumentation() != null)
      {
         String prefix = wsdl.getPrefix(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS);
         if (prefix == null)
View Full Code Here

   {
      log.trace("processPort: " + srcPort.getName());

      Binding srcBinding = getDefinedBinding(srcPort);
      QName endpointName = new QName(srcWsdl.getTargetNamespace(), srcPort.getName());
      WSDLEndpoint destEndpoint = new WSDLEndpoint(destService, endpointName);
      destEndpoint.setBinding(srcBinding.getQName());
      destEndpoint.setAddress(getSOAPAddress(srcPort));
      processUnknownExtensibilityElements(srcPort, destEndpoint);

      WSDLBinding destBinding = processBinding(srcWsdl, srcBinding);
      if (destBinding != null)
         destService.addEndpoint(destEndpoint);
View Full Code Here

         if (endpoints == null || endpoints.length == 0)
            errorList.add("endpoints cannot be null");

         for (int j = 0; j < endpoints.length; j++)
         {
            WSDLEndpoint endpoint = endpoints[j];
            if (endpoint.getName() == null)
               errorList.add("endpoint name cannot be null");
            if (endpoint.getBinding() == null)
               errorList.add("endpoint binding cannot be null");
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsdl.WSDLEndpoint

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.