Package org.codehaus.xfire.exchange

Examples of org.codehaus.xfire.exchange.AbstractMessage


                catch (XFireFault fault)
                {
                    /* If this happens we've most likely received some invalid
                     * WS-Addressing headers, so lets try to make the best of it.
                     */
                    AbstractMessage faultMsg = context.getExchange().getFaultMessage();
                    AddressingHeaders outHeaders = (AddressingHeaders) faultMsg.getProperty(ADRESSING_HEADERS);
                    if (outHeaders == null)
                    {
                        outHeaders = new AddressingHeaders();
                       
                        if (headers != null)
                            outHeaders.setRelatesTo(headers.getMessageID());
                       
                        outHeaders.setAction(WSAConstants.WSA_200508_FAULT_ACTION);
                        faultMsg.setProperty(ADRESSING_HEADERS, outHeaders);
                        faultMsg.setProperty(ADRESSING_FACTORY, factory);
                    }
                    throw fault;
                }
            }
        }
View Full Code Here


        }
        catch (Exception e1)
        {
            XFireFault fault = XFireFault.createFault(e1);
           
            AbstractMessage faultMsg = context.getExchange().getFaultMessage();
            faultMsg.setBody(fault);
           
            context.setCurrentMessage(faultMsg);
           
            HandlerPipeline inPipe = new HandlerPipeline(getXFire().getInPhases());
            inPipe.addHandlers(getFaultHandlers());
View Full Code Here

            int doAction = WSSecurityUtil.decodeAction(action, actions);

            String actor = (String) getOption(WSHandlerConstants.ACTOR);

            AbstractMessage sm = msgContext.getCurrentMessage();
            Document doc = (Document) sm.getProperty(DOMInHandler.DOM_MESSAGE);

            if (doc == null){
                log.error("DOMInHandler must be enabled for WS-Security!");
                throw new XFireRuntimeException("DOMInHandler must be enabled for WS-Security!");
            }

            /*
             * Check if it's a response and if its a fault. Don't process
             * faults.
             */
            if (sm.getBody() instanceof XFireFault)
                return;

            /*
             * To check a UsernameToken or to decrypt an encrypted message we
             * need a password.
View Full Code Here

    public Object readObject(MessageReader reader, MessageContext context)
        throws XFireFault
    {
        Object o = delegate.readObject(reader, context);
        AbstractMessage msg;
        if (AbstractBinding.isClientModeOn(context))
            msg = context.getOutMessage();
        else
            msg = context.getInMessage();
       
        Object[] params = (Object[]) msg.getBody();
        MessagePartInfo part = (MessagePartInfo)
            context.getProperty(AegisBindingProvider.CURRENT_MESSAGE_PART);

        setValue(params[part.getIndex()], o);
       
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.exchange.AbstractMessage

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.