Package org.jboss.ws.metadata.umdm

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


         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

      }

      while(endpoints.hasNext())
      {
         Endpoint auxEndpoint = endpoints.next();
         ServerEndpointMetaData sepMetaData = auxEndpoint.getAttachment(ServerEndpointMetaData.class);
         if (pcName.equals(sepMetaData.getPortComponentName()))
         {
            if (endpoint != null)
            {
               log.warn("Multiple service endoints found for: " + pcLink);
               endpoint = null;
View Full Code Here

   public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext invContext)
   {
      log.debug("handleRequest: " + endpoint.getName());

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

      Type type = sepMetaData.getType();
     
      // Build the message context
      CommonMessageContext msgContext;
      if (type == EndpointMetaData.Type.JAXRPC)
      {
View Full Code Here

   private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource, InvocationContext reqContext, InputStream inputStream)
         throws BindingException
   {
      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();

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

      long beginProcessing = 0;
      ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
      try
      {
         EndpointState state = ep.getState();
         if (state != EndpointState.STARTED)
         {
            QName faultCode = Constants.SOAP11_FAULT_CODE_SERVER;
            String faultString = "Endpoint cannot handle requests in state: " + state;
            throw new CommonSOAPFaultException(faultCode, faultString);
         }

         log.debug("BEGIN handleRequest: " + ep.getName());
         beginProcessing = initRequestMetrics(ep);

         MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() : null);

         MessageAbstraction reqMessage;

         String bindingID = sepMetaData.getBindingId();
         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
         {
            reqMessage = new HTTPMessageImpl(headers, inputStream);
         }
         else
         {

            msgFactory.setServiceMode(sepMetaData.getServiceMode());
            msgFactory.setStyle(sepMetaData.getStyle());

            reqMessage = (SOAPMessageImpl)msgFactory.createMessage(headers, inputStream);
         }

         // Associate current message with message context
         msgContext.setMessageAbstraction(reqMessage);

         // debug the incomming message
         MessageTrace.traceMessage("Incoming Request Message", reqMessage);

         // Set the thread context class loader
         ClassLoader classLoader = sepMetaData.getClassLoader();
         Thread.currentThread().setContextClassLoader(classLoader);

         // Get the Invoker
         ServiceEndpointInvoker epInvoker = ep.getAttachment(ServiceEndpointInvoker.class);
         if (epInvoker == null)
View Full Code Here

   public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, InvocationContext context)
   {
      log.debug("handleWSDLRequest: " + endpoint.getName());

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

      ServletRequestContext reqContext = (ServletRequestContext)context;
      HttpServletRequest req = reqContext.getHttpServletRequest();
View Full Code Here

      ServletContext ctx = getServletContext();
      String configName = ctx.getInitParameter("jbossws-config-name");
      String configFile = ctx.getInitParameter("jbossws-config-file");
      if (configName != null || configFile != null)
      {
         ServerEndpointMetaData epMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
         if (epMetaData == null)
            throw new IllegalStateException("Cannot obtain endpoint meta data");

         log.debug("Updating service endpoint config\n  config-name: " + configName + "\n  config-file: " + configFile);
         epMetaData.setConfigName(configName, configFile);
      }
   }  
View Full Code Here

               EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
               Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
               if (endpoint == null)
                  throw new WSException("Cannot resolve port-component-link: " + pcLink);

               ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
               endpointAddress = sepMetaData.getEndpointAddress();
            }
            catch (Throwable ex)
            {
               // ignore, we are probably a remote client
            }
View Full Code Here

  
   private InjectionsMetaData getInjectionsMetaData(EndpointConfigMetaData endpointConfigMD)
   {
      if (endpointConfigMD.getEndpointMetaData() instanceof ServerEndpointMetaData)
      {
         ServerEndpointMetaData endpointMD = ((ServerEndpointMetaData)endpointConfigMD.getEndpointMetaData());
         return endpointMD.getEndpoint().getAttachment(InjectionsMetaData.class);
      }
      else
      {
         return null;
      }
View Full Code Here

      }

      while(endpoints.hasNext())
      {
         Endpoint auxEndpoint = endpoints.next();
         ServerEndpointMetaData sepMetaData = auxEndpoint.getAttachment(ServerEndpointMetaData.class);
         if (pcName.equals(sepMetaData.getPortComponentName()))
         {
            if (endpoint != null)
            {
               log.warn("Multiple service endoints found for: " + pcLink);
               endpoint = null;
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.