Examples of SOAPMessageContext


Examples of com.sun.enterprise.admin.wsmgmt.SOAPMessageContext

        com.sun.appserv.management.ext.wsmgmt.MessageTraceImpl trace =
            (com.sun.appserv.management.ext.wsmgmt.MessageTraceImpl)
            _messages.get(messageId);

        SOAPMessageContext mctx = ctx.getMessageContext();

        // sets response content, size and message header
        setResponseInfo(mctx, trace);

        // sets caller principal
View Full Code Here

Examples of com.sun.xml.rpc.soap.message.SOAPMessageContext

    }

    public void _preHandlingHook (StreamingSenderState state)
    throws Exception {
        try {
             SOAPMessageContext messageContext = state.getMessageContext();
             SOAPMessage message = state.getResponse().getMessage();

             String operation = (String)messageContext.getProperty(CONTEXT_OPERATION);

             StaticApplicationContext sContext = getPolicyContext ();
             sContext.setOperationIdentifier (operation);

             SecurityPolicy policy = _sConfig.getSecurityConfiguration (sContext);
View Full Code Here

Examples of com.sun.xml.rpc.spi.runtime.SOAPMessageContext

  if(_logger.isLoggable(Level.FINE)){
      _logger.fine("ws.processRequest");
  }

        final SOAPMessageContext finalMC = messageContext;
  Implementor implementor = (Implementor) messageContext.getProperty( IMPLEMENTOR );
        final Tie tie = implementor.getTie();
  StreamingHandler handler = (StreamingHandler) implementor.getTie();
  SOAPMessage request = finalMC.getMessage();
  final ServerAuthContext sAC = config_.getAuthContext(handler,request);

        boolean status = true;
  try {
      if (sAC != null) {
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

    * @throws Exception if any error occurs
    */
   @Override
   public Object invoke(final org.jboss.invocation.Invocation jbossInvocation) throws Exception
   {
      final SOAPMessageContext msgContext = (SOAPMessageContext) jbossInvocation
            .getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
      if (msgContext == null)
      {
         // not for us
         return this.getNext().invoke(jbossInvocation);
      }

      final Invocation wsInvocation = (Invocation) jbossInvocation.getValue(Invocation.class.getName());
      final HandlerCallback callback = (HandlerCallback) jbossInvocation.getValue(HandlerCallback.class.getName());

      if (callback == null || wsInvocation == null)
      {
         log.warn("Handler callback not available");
         return this.getNext().invoke(jbossInvocation);
      }

      // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
      try
      {
         // call the request handlers
         boolean handlersPass = callback.callRequestHandlerChain(wsInvocation, HandlerType.ENDPOINT);
         handlersPass = handlersPass && callback.callRequestHandlerChain(wsInvocation, HandlerType.POST);

         // Call the next interceptor in the chain
         if (handlersPass)
         {
            // The SOAPContentElements stored in the EndpointInvocation might have changed after
            // handler processing. Get the updated request payload. This should be a noop if request
            // handlers did not modify the incomming SOAP message.
            final Object[] reqParams = wsInvocation.getArgs();
            jbossInvocation.setArguments(reqParams);
            final Object resObj = this.getNext().invoke(jbossInvocation);

            // Setting the message to null should trigger binding of the response message
            msgContext.setMessage(null);
            wsInvocation.setReturnValue(resObj);
         }

         // call the response handlers
         handlersPass = callback.callResponseHandlerChain(wsInvocation, HandlerType.POST);
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

        private JAXRPCHandlersInterceptor() {}

        @Override
        public Object processInvocation(final InterceptorContext context) throws Exception {
            final SOAPMessageContext msgContext = (SOAPMessageContext) context.getPrivateData(MessageContext.class);
            final Invocation wsInvocation = (Invocation) context.getPrivateData(Invocation.class);
            final HandlerCallback callback = (HandlerCallback) context.getPrivateData(HandlerCallback.class);
            if (msgContext == null || callback == null || wsInvocation == null) {
                // not for us
                return context.proceed();
            }

            // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
            try {
                // call the request handlers
                boolean handlersPass = callback.callRequestHandlerChain(wsInvocation, HandlerType.ENDPOINT);
                handlersPass = handlersPass && callback.callRequestHandlerChain(wsInvocation, HandlerType.POST);

                // Call the next interceptor in the chain
                if (handlersPass) {
                    // The SOAPContentElements stored in the EndpointInvocation might have changed after
                    // handler processing. Get the updated request payload. This should be a noop if request
                    // handlers did not modify the incomming SOAP message.
                    final Object[] reqParams = wsInvocation.getArgs();
                    context.setParameters(reqParams);
                    final Object resObj = context.proceed();

                    // Setting the message to null should trigger binding of the response message
                    msgContext.setMessage(null);
                    wsInvocation.setReturnValue(resObj);
                }

                // call the response handlers
                handlersPass = callback.callResponseHandlerChain(wsInvocation, HandlerType.POST);
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

            throw new JAXRPCException(messageText, ex);
        }
    }

    public boolean handleFault(MessageContext _context) {
        SOAPMessageContext context = (SOAPMessageContext) _context;

        for (int i = size() - 1; i >= 0; i--)
            if (getHandlerInstance(i).handleFault(context) == false)
                return false;
        return true;
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

                return false;
        return true;
    }

    public boolean handleRequest(MessageContext _context) {
        SOAPMessageContext context = (SOAPMessageContext) _context;

        boolean processFault = false;

        for (int i = 0; i < size(); i++) {
            Handler currentHandler = getHandlerInstance(i);
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

    public boolean handleRequest( MessageContext msgContext )
    {
        try
        {
            LOG.debug( MSG.getMessage( Keys.RECEIVED_REQUEST ) );
            SOAPMessageContext soapMsgContext = (SOAPMessageContext) msgContext;
            SOAPEnvelope envelope = soapMsgContext.getMessage().getSOAPPart().getEnvelope();
            if ( LOG.isDebugEnabled() )
            {
                LOG.debug( "Received SOAP request: \n" + envelope );
            }
            org.apache.ws.util.soap.Body body = getSoapBody( envelope );
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

   /** Before and after we call the service endpoint bean, we process the handler chains.
    */
   public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
   {
      // If no msgContext, it's not for us
      SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
      if (msgContext == null)
      {
         return getNext().invoke(jbInv);
      }

      // Get the endpoint invocation
      Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());

      // Get the handler callback
      HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());

      // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
      if (callback != null && wsInv != null)
      {
         try
         {
            // call the request handlers
            boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
            handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);

            // Call the next interceptor in the chain
            if (handlersPass)
            {
               // The SOAPContentElements stored in the EndpointInvocation might have changed after
               // handler processing. Get the updated request payload. This should be a noop if request
               // handlers did not modify the incomming SOAP message.
               Object[] reqParams = wsInv.getArgs();
               jbInv.setArguments(reqParams);
               Object resObj = getNext().invoke(jbInv);

               // Setting the message to null should trigger binding of the response message
               msgContext.setMessage(null);
               wsInv.setReturnValue(resObj);
            }

            // call the response handlers
            handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
View Full Code Here

Examples of javax.xml.rpc.handler.soap.SOAPMessageContext

    public boolean handleRequest( MessageContext msgContext )
    {
        try
        {
            LOG.debug( MSG.getMessage( Keys.RECEIVED_REQUEST ) );
            SOAPMessageContext soapMsgContext = (SOAPMessageContext) msgContext;
            SOAPEnvelope envelope = soapMsgContext.getMessage().getSOAPPart().getEnvelope();
            EnvelopeDocument envelopeDocXmlBean = EnvelopeDocument.Factory.parse( envelope.toString() );
            Envelope envelopeXmlBean = envelopeDocXmlBean.getEnvelope();
            Body body = envelopeXmlBean.getBody();

            ResourceContext resourceContext = createResourceContext( soapMsgContext );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.