Package org.jboss.ws.metadata.wsdl

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


   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);
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

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


      int lenendpoints = 0;
      if (endpoints != null)
         lenendpoints = endpoints.length;
      for (int j = 0; j < lenendpoints; j++)
      {
         WSDLEndpoint endpt = endpoints[j];
         String portname = endpt.getName().getLocalPart();
         //port mapping
         PortMapping pm = new PortMapping(sim);
         pm.setPortName(portname);
         pm.setJavaPortName(portname);
         sim.addPortMapping(pm);
View Full Code Here

      int lenendpoints = 0;
      if (endpoints != null)
         lenendpoints = endpoints.length;
      for (int j = 0; j < lenendpoints; j++)
      {
         WSDLEndpoint endpt = endpoints[j];
         QName binding = endpt.getBinding();
         WSDLBinding wsdlbind = wsdlDefinitions.getBinding(binding);
         String bindName = wsdlbind.getName().getLocalPart();
         QName portTypeName = wsdlbind.getInterfaceName();
         WSDLInterface wsdlintf = wsdlDefinitions.getInterface(portTypeName);
         String portName = wsdlintf.getName().getLocalPart();
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);
      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

         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

      }
      //Port scope
      WSDLService wsdlService = wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName());
      if (wsdlService != null)
      {
         WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getPortName());
         if (wsdlEndpoint != null)
         {
            List<WSDLExtensibilityElement> portPolicyRefList = wsdlEndpoint.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE);
            processPolicies(portPolicyRefList, PolicyScopeLevel.WSDL_PORT, localPolicyRegistry, epMetaData);
         }
         else
         {
            log
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

         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

      WSDLService service = wsdlDefinitions.getService(new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventingService"));
      assertNotNull(service);
      WSDLEndpoint[] endpoints = service.getEndpoints();
      for (int i = 0; i < endpoints.length; i++)
      {
         WSDLEndpoint ep = endpoints[i];
         assertEquals(EventingConstants.NS_EVENTING, ep.getName().getNamespaceURI());
      }

      WSDLInterface warningsInterface = wsdlDefinitions.getInterface(new QName(wsdlDefinitions.getTargetNamespace(), "Warnings"));
      assertNotNull("Event source port type not parsed", warningsInterface);
      assertEquals(warningsInterface.getName().getNamespaceURI(), "http://www.example.org/oceanwatch");
View Full Code Here

   public void testEndpointPolicyRef(File wsdlFile) throws Exception
   {
      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
      WSDLService wsdlService = wsdlDefinitions.getServices()[0];
      WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoints()[0];
     
      List<WSDLExtensibilityElement> extPortList = wsdlEndpoint.getExtensibilityElements(
            Constants.WSDL_ELEMENT_POLICYREFERENCE);
      assertNotNull(extPortList);
      assertEquals(extPortList.size(),1);
      assertPolicyRef(extPortList.get(0),"uselessPortPolicy");
     
      WSDLProperty extPortTypeProp = wsdlEndpoint.getInterface().getProperty(
            Constants.WSDL_PROPERTY_POLICYURIS);
      assertEquals(extPortTypeProp.getValue(),"#RmPolicy");
     
      WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(wsdlEndpoint.getBinding());
      List<WSDLExtensibilityElement> extBinding = wsdlBinding.getExtensibilityElements(
            Constants.WSDL_ELEMENT_POLICYREFERENCE);
      assertNotNull(extBinding);
      assertEquals(extBinding.size(),2);
      assertPolicyRef(extBinding.get(0),"RmPolicy");
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.