XFire HttpState settings

View: New views
1 Messages — Rating Filter:   Alert me  

XFire HttpState settings

by pcable :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am have this working in just HttpClient as follows:

                        HttpClient client = new HttpClient();
                    List authPrefs = new ArrayList(1);
                    authPrefs.add(AuthPolicy.DIGEST);
                    client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
                   
                    UsernamePasswordCredentials upc = new UsernamePasswordCredentials("~~username~~", "~~password~~");
                AuthScope as = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM, "digest");
                client.getState().setCredentials(as, upc); //WORKS

                        GetMethod gm = new GetMethod("http://~~server~~/Maps/MapsServiceStaging/VendorExtranet.asmx/GetPDF?platId=23&color=true");
                        int status = client.executeMethod(gm);
                        System.out.println("Response Status: "+ status);



However, I need this to work within XFire WS.

I understand how to set the HttpClient parameters inside of XFire, but I have not been able to determine how to set the State information.

HttpClient parameters are done as follows:

    Client secureClient = Client.getInstance(service);
        List authPrefs = new ArrayList(1);
        authPrefs.add(AuthPolicy.DIGEST);
        HttpClientParams clientParams = new HttpClientParams();
        clientParams.setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
    secureClient.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS, clientParams);

Any help would be GREATLY appreciated.
Thanks,
pcable