Package org.jboss.ws.metadata.umdm

Examples of org.jboss.ws.metadata.umdm.ServerEndpointMetaData


   /** Initialize the service endpoint */
   public void init(Endpoint endpoint)
   {
      this.endpoint = endpoint;

      ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
      if (sepMetaData == null)
         throw new IllegalStateException("Cannot obtain endpoint meta data");

      if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
      {
         bindingProvider = new CommonBindingProvider(sepMetaData);
         delegate = new HandlerDelegateJAXRPC(sepMetaData);
      }
      else
View Full Code Here


   /** Invoke the the service endpoint */
   public void invoke(InvocationContext invContext) throws Exception
   {
      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)msgContext.getEndpointMetaData();
      MessageAbstraction reqMessage = msgContext.getMessageAbstraction();

      // The direction of the message
      DirectionHolder direction = new DirectionHolder(Direction.InBound);

View Full Code Here

         throw new WSException("Cannot resolve port-component-link: " + pcLink);

      res.setContentType("text/plain");
      PrintWriter out = res.getWriter();

      ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
      String endpointAddress = sepMetaData.getEndpointAddress();
      out.println(endpointAddress);

      log.debug("Resolved " + pcLink + " to: " + endpointAddress);
      out.close();
   }
View Full Code Here

   protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception
   {
      Invocation inv = super.setupInvocation(ep, epInv, invContext);

      // Attach the handler callback
      ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
      invContext.addAttachment(HandlerCallback.class, new HandlerCallbackImpl(sepMetaData));

      return inv;
   }
View Full Code Here

         dep.addAttachment(UnifiedMetaData.class, umd);
      }

      for (Endpoint ep : dep.getService().getEndpoints())
      {
         ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
         if (sepMetaData == null)
         {
            sepMetaData = getEndpointMetaData(umd, ep);
            sepMetaData.setEndpoint(ep);

            ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);

            String targetBean = ep.getTargetBeanName();
            if (targetBean != null)
               sepMetaData.setServiceEndpointImplName(targetBean);
         }
      }
   }
View Full Code Here

   private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
   {
      String epName = ep.getShortName();

      ServerEndpointMetaData epMetaData = null;
      for (ServiceMetaData serviceMetaData : umd.getServices())
      {
         for (EndpointMetaData aux : serviceMetaData.getEndpoints())
         {
            String linkName = ((ServerEndpointMetaData)aux).getLinkName();
View Full Code Here

   @Override
   public void create(Deployment dep)
   {
      for (Endpoint ep : dep.getService().getEndpoints())
      {
         ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
         if (sepMetaData == null)
            throw new IllegalStateException("Cannot obtain endpoint meta data");

         EventingEpMetaExt ext = (EventingEpMetaExt)sepMetaData.getExtension(EventingConstants.NS_EVENTING);
         if (ext != null)
         {
            // Currently several endpoints may belong to an event source deployment.
            // Therefore we have to avoid duplicate registrations
            // Actually there should be a 1:n mapping of event source NS to endpoints.
            // See also http://jira.jboss.org/jira/browse/JBWS-770

            // create pending incomplete event source
            EventingEndpointDeployment desc = new EventingEndpointDeployment(ext.getEventSourceNS(), ext.getNotificationSchema(), ext.getNotificationRootElementNS());
            desc.setEndpointAddress(sepMetaData.getEndpointAddress());
            desc.setPortName(sepMetaData.getPortName());

            SubscriptionManagerFactory factory = SubscriptionManagerFactory.getInstance();
            SubscriptionManagerMBean manager = factory.getSubscriptionManager();
            manager.registerEventSource(desc);
         }
View Full Code Here

   @Override
   public void destroy(Deployment dep)
   {
      for (Endpoint ep : dep.getService().getEndpoints())
      {
         ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
         if (sepMetaData == null)
            throw new IllegalStateException("Cannot obtain endpoint meta data");

         EventingEpMetaExt ext = (EventingEpMetaExt)sepMetaData.getExtension(EventingConstants.NS_EVENTING);
         if (ext != null)
         {
            SubscriptionManagerFactory factory = SubscriptionManagerFactory.getInstance();
            SubscriptionManagerMBean manager = factory.getSubscriptionManager();
            manager.removeEventSource(ext.getEventSourceURI());
View Full Code Here

     
      QName serviceName = new QName("http://org.jboss.ws/jaxws/endpoint", "TestService");
      ServiceMetaData serviceMetaData = new ServiceMetaData(umd, serviceName);
      QName portName = new QName("http://org.jboss.ws/jaxws/endpoint", "EndpointInterfacePort");
      QName portTypeName = new QName("http://org.jboss.ws/jaxws/endpoint", "EndpointInterface");
      EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, null, portName, portTypeName, Type.JAXWS);

      Map<String, Class> map = new HashMap<String, Class>();
      map.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", NopAssertionDeployer.class);
      map.put("http://www.fabrikam123.example.com/stock", NopAssertionDeployer.class);
      map.put("http://schemas.xmlsoap.org/ws/2005/07/securitypolicy", NopAssertionDeployer.class);
      PolicyDeployer deployer = PolicyDeployer.newInstance(map);
      PolicyMetaDataBuilder builder = new PolicyMetaDataBuilder(deployer);

      WSDLDefinitions wsdlDefinitions = readWsdl("resources/jaxws/wspolicy/TestService.wsdl");
      builder.processPolicyExtensions(epMetaData, wsdlDefinitions);

      PolicyMetaExtension policyExt = (PolicyMetaExtension)epMetaData.getExtension(Constants.URI_WS_POLICY);
      Collection<Policy> bindingPolicies = policyExt.getPolicies(PolicyScopeLevel.WSDL_BINDING);
      assertNotNull(bindingPolicies);
      assertEquals(2, bindingPolicies.size());
      Iterator<Policy> bindingPoliciesIterator = bindingPolicies.iterator();
      String id1 = bindingPoliciesIterator.next().getId();
View Full Code Here

      UnifiedVirtualFile vfRoot = new URLLoaderAdapter(new File("resources/jaxws/wspolicy").toURL());
      UnifiedMetaData umd = new UnifiedMetaData(vfRoot);
      ServiceMetaData serviceMetaData = new ServiceMetaData(umd, new QName("dummyServiceName"));
      umd.addService(serviceMetaData);
      EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, null, new QName("dummyPortName"), new QName("dummyPortTypeName"), Type.JAXWS);
      serviceMetaData.addEndpoint(epMetaData);
     
      builder.processPolicyAnnotations(epMetaData, TestMultipleEndpointPolicy.class);

      PolicyMetaExtension policyExt = (PolicyMetaExtension)epMetaData.getExtension(Constants.URI_WS_POLICY);

      Collection<Policy> portPolicies = policyExt.getPolicies(PolicyScopeLevel.WSDL_PORT);
      assertNotNull(portPolicies);
      assertEquals(2, portPolicies.size());
      Iterator<Policy> portPoliciesIterator = portPolicies.iterator();
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.umdm.ServerEndpointMetaData

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.