Package flex.messaging.messages

Examples of flex.messaging.messages.HTTPMessage


    //--------------------------------------------------------------------------

    /** {@inheritDoc} */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
View Full Code Here


            ServiceException e = new ServiceException();
            e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"});
            throw e;
        }

        HTTPMessage message = (HTTPMessage)msg;

        String destination = message.getDestination();
        HTTPProxyDestination dest = (HTTPProxyDestination)destinations.get(destination);

        //use the remote settings if the message didn't specify them
        FlexRemoteCredentials remoteCredentials =
            FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
        if (remoteCredentials != null)
        {
            message.setRemoteUsername(remoteCredentials.getUsername());
            message.setRemotePassword((String)remoteCredentials.getCredentials());
        }
        else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null)
        {
            message.setRemoteUsername(dest.getRemoteUsername());
            message.setRemotePassword(dest.getRemotePassword());
        }

        ServiceAdapter adapter = dest.getAdapter();

        Object result;
View Full Code Here

            ServiceException e = new ServiceException();
            e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"});
            throw e;           
        }
       
        HTTPMessage message = (HTTPMessage)msg;

        String destination = message.getDestination();
        HTTPProxyDestination dest = (HTTPProxyDestination)destinations.get(destination);

        //use the remote settings if the message didn't specify them
        FlexRemoteCredentials remoteCredentials =
            FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
        if (remoteCredentials != null)
        {
            message.setRemoteUsername(remoteCredentials.getUsername());
            message.setRemotePassword((String)remoteCredentials.getCredentials());
        }
        else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null)
        {
            message.setRemoteUsername(dest.getRemoteUsername());
            message.setRemotePassword(dest.getRemotePassword());
        }

        ServiceAdapter adapter = dest.getAdapter();

        Object result;
View Full Code Here

    //--------------------------------------------------------------------------

    /** {@inheritDoc} */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
View Full Code Here

    //--------------------------------------------------------------------------

    /** {@inheritDoc} */   
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage)msg;
        ProxyContext context = new ProxyContext();

        if (message instanceof SOAPMessage)
        {
            context.setSoapRequest(true);
View Full Code Here

            ServiceException e = new ServiceException();
            e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"});
            throw e;           
        }
       
        HTTPMessage message = (HTTPMessage)msg;

        String destination = message.getDestination();
        HTTPProxyDestination dest = (HTTPProxyDestination)destinations.get(destination);

        //use the remote settings if the message didn't specify them
        FlexRemoteCredentials remoteCredentials =
            FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
        if (remoteCredentials != null)
        {
            message.setRemoteUsername(remoteCredentials.getUsername());
            message.setRemotePassword((String)remoteCredentials.getCredentials());
        }
        else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null)
        {
            message.setRemoteUsername(dest.getRemoteUsername());
            message.setRemotePassword(dest.getRemotePassword());
        }

        ServiceAdapter adapter = dest.getAdapter();

        Object result;
View Full Code Here

    /**
     * Handle a data message intended for this adapter.
     */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
View Full Code Here

    //                
    //--------------------------------------------------------------------------
   
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage)msg;
        ProxyContext context = new ProxyContext();

        if (message instanceof SOAPMessage)
        {
            context.setSoapRequest(true);
View Full Code Here

TOP

Related Classes of flex.messaging.messages.HTTPMessage

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.