Package flex.messaging.services.http

Examples of flex.messaging.services.http.HTTPProxyDestination


        HTTPProxyService proxyService = createProxyService();
        getMessageBroker().addService(proxyService);
       
        // Create destination and add to the Service
        String dest = "HTTPProxyDest_startup";
        HTTPProxyDestination proxyDest = createProxyDestination(dest, proxyService);                  
        proxyService.addDestination(proxyDest);
       
        // This is needed to set the properties on the adapter: after both service
        // and destination exist
        createAdapter(proxyDest);       
View Full Code Here


        </properties>
    </destination>
     */
    private HTTPProxyDestination createProxyDestination(String id, HTTPProxyService proxyService)
    {
        HTTPProxyDestination proxyDest = new HTTPProxyDestination(true);
      proxyDest.setId(id);
      proxyDest.setService(proxyService);
      
        // we'll use the default channel - so nothing else is needed
        proxyDest.addChannel("qa-amf");
        //Use this type of code to generate the warning "No channel with id '{0}' is known by the MessageBroker. Not adding the channel.",
       
        // set destination properties
        proxyDest.setDefaultUrl("http://10.60.144.67:8080/services/httpservice/echoParams.jsp");
              
        return proxyDest;
    }
View Full Code Here

     * @return The <code>Destination</code> instanced created.
     */
    @Override
    public Destination createDestination(String id)
    {
        HTTPProxyDestination destination = new HTTPProxyDestination();
        destination.setId(id);
        destination.setManaged(isManaged());
        destination.setService(this);

        return destination;
    }
View Full Code Here

     * @param destination The <code>Destination</code> instance to be added.
     */
    @Override
    public void addDestination(Destination destination)
    {
        HTTPProxyDestination proxyDestination = (HTTPProxyDestination)destination;
        super.addDestination(proxyDestination);
    }
View Full Code Here

        }

        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;

        if (message instanceof SOAPMessage)
        {
View Full Code Here

    </destination>
     */
    private void createDestination2(Service service)
    {
        String destinationId = "myHTTPService";
        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
       
        destination.setDefaultUrl("http://www.mycompany.com/services/myservlet");
        destination.addDynamicUrl("http://www.mycompany.com/services/*");

        String adapterId = "http-proxy";
        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
        addProperties(adapter);
    }
View Full Code Here

    </destination>    
     */
    private void createDestination3(Service service)
    {
        String destinationId = "echoSoapService";
        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);

        destination.setDefaultUrl("http://{server.name}:{server.port}/myapp/echo?wsdl");
        destination.addDynamicUrl("http://{server.name}:/myapp/echo");

        String adapterId = "soap-proxy";
        SOAPProxyAdapter adapter = (SOAPProxyAdapter)destination.createAdapter(adapterId);
        addProperties(adapter);
    }
View Full Code Here

    {
        String serviceId = "proxy-service";
        String id = "RC_WeatherService";
       
        HTTPProxyService proxyService = (HTTPProxyService)msgBroker.getService(serviceId);
        HTTPProxyDestination proxyDest = new HTTPProxyDestination();
        proxyDest.setId(id);
        proxyDest.setManaged(true);
        proxyDest.setService(proxyService);
       
        // we'll use the default channel - so nothing else is needed            
        // we'll use the default adapter - so nothing else is needed
        // set destination properties
              
        proxyDest.setDefaultUrl("http://{server.name}:{server.port}/{context.root}/services/WeatherService?wsdl");
        proxyDest.addDynamicUrl("http://{server.name}:*/{context.root}/services/WeatherService");

        proxyService.addDestination(proxyDest);
       
        if (proxyService.isStarted())
            proxyDest.start();
       
        return "Destination: "+id+" created for Service: "+serviceId;
    }
View Full Code Here

    </destination>
     */
    public void createDestination1(Service service)
    {
        String destinationId = "DefaultHTTP";
        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);

        destination.addDynamicUrl("http://{server.name}:*/{context.root}/*");

        String adapterId = "http-proxy";
        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
        addProperties(adapter);
    }
View Full Code Here

        // Get the instance of the proxy-service from MessageBroker
        HTTPProxyService proxyService = (HTTPProxyService)broker.getService("proxy-service");
       
        // Create destination and add to the Service
        id = "SOAPProxyDest_startup";       
        HTTPProxyDestination proxyDest = createProxyDestination(id, proxyService);                  
       
        // This is needed to set the properties on the adapter: after both service
        // and destination exist
        createAdapter(proxyDest);
    }
View Full Code Here

TOP

Related Classes of flex.messaging.services.http.HTTPProxyDestination

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.