Examples of OutMessage


Examples of org.codehaus.xfire.exchange.OutMessage

        if (context.getExchange().hasOutMessage())
        {
            HandlerPipeline pipeline = new HandlerPipeline(context.getXFire().getOutPhases());
            pipeline.addHandlers(context.getService().getOutHandlers());
            pipeline.addHandlers(context.getXFire().getOutHandlers());
            OutMessage msg = context.getExchange().getOutMessage();
            pipeline.addHandlers(msg.getChannel().getTransport().getOutHandlers());

            context.setOutPipeline(pipeline);
        }
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

    }

    public void invoke(MessageContext context)
        throws Exception
    {
        OutMessage message = (OutMessage) context.getCurrentMessage();
        W3CDOMStreamWriter writer = new W3CDOMStreamWriter(builder);
        message.getSerializer().writeMessage(message, writer, context);
      
        Document doc = writer.getDocument();
        message.setProperty(DOM_MESSAGE, doc);
        message.setSerializer(new DOMSerializer());
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

    }

    protected void sendFault(XFireFault fault, MessageContext context)
    {
        // Create the outgoing fault message
        OutMessage outMsg = (OutMessage) context.getExchange().getFaultMessage();
       
        outMsg.setSerializer(context.getService().getFaultSerializer());
        outMsg.setBody(fault);
       
        context.setCurrentMessage(outMsg);
       
        // Create a fault pipeline
        HandlerPipeline faultPipe = new HandlerPipeline(context.getXFire().getOutPhases());
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

             * over the wire. Therefore this must shall be the last (or only)
             * handler in a chain.
             *
             * Now we can perform our security operations on this request.
             */
            OutMessage message = (OutMessage) mc.getCurrentMessage();
            Document doc = (Document) message.getProperty(DOMOutHandler.DOM_MESSAGE);
            if( doc == null ){
              log.error("There is no DOM message in current message. Add DOMOutHandler to your handlers chain");
              throw new XFireFault("There is no DOM message in current message. Add DOMOutHandler to your handlers chain",XFireFault.RECEIVER);
            }
            /**
 
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

     
    }
   
    Object[] invoke(OperationInfo op, XMLStreamReader reader) throws Exception{
      OutMessage msg = new OutMessage(client.getUrl());
      msg.setSerializer(new RawDataSerializer(reader));
      return invoke(op,msg);
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

    }
   
   
    Object[] invoke(OperationInfo op, Object[] params) throws Exception
    {
      OutMessage msg = new OutMessage(client.getUrl());
      msg.setBody(params);
      return invoke(op,msg);
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

    public void invoke(MessageContext context) throws Exception {
        Object value = context.getProperty(RESPONSE_VALUE);
       
        if (context.getExchange().hasOutMessage())
        {
            OutMessage outMsg = context.getExchange().getOutMessage();
            ServiceInvocationHandler.writeHeaders(context, value);
            context.setCurrentMessage(outMsg);
            outMsg.setBody(new Object[] {value});
            outMsg.setSerializer(context.getBinding().getSerializer(context.getExchange().getOperation()));
           
            try
            {
                context.getOutPipeline().invoke(context);
            }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

     * @throws XFireFault
     */
    public void invoke(MessageContext context)
        throws Exception
    {
        OutMessage msg = (OutMessage) context.getExchange().getFaultMessage();
        MessageSerializer serializer = msg.getSerializer();

        msg.setSerializer(new SoapSerializer(serializer));
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

        if (getSoapAction() != null)
        {
            postMethod.setRequestHeader("SOAPAction", getQuotedSoapAction());
        }
       
        OutMessage message = getMessage();
        boolean mtomEnabled = Boolean.valueOf((String) context.getContextualProperty(SoapConstants.MTOM_ENABLED)).booleanValue();
        Attachments atts = message.getAttachments();
       
        if (mtomEnabled || atts != null)
        {
            if (atts == null)
            {
                atts = new JavaMailAttachments();
                message.setAttachments(atts);
            }
           
            source = new OutMessageDataSource(context, message);
            DataHandler soapHandler = new DataHandler(source);
            atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false));
View Full Code Here

Examples of org.codehaus.xfire.exchange.OutMessage

    }

    private RequestEntity getByteArrayRequestEntity()
        throws IOException, XFireException
    {
        OutMessage message = getMessage();
        MessageContext context = getMessageContext();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        OutputStream os = bos;

        if (isGzipRequestEnabled(context))
        {
            os = new GZIPOutputStream(os);
        }
       
        Attachments atts = message.getAttachments();
        if (atts != null)
        {
            atts.write(os);
        }
        else
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.