axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbe Fabrice <Fabrice.Ro...@devoteam.com>
Subject [No Subject]
Date Wed, 08 Apr 2009 14:16:07 GMT
Hi,
I'am trying to use Axis 2 to call MSSQL Report Server Web Services. Authentication is done
with IIS and NTLM.
I found a lot of code sample but nothing work, I always have a 401 : Acces Denied. 
Does anyone succed using NTLM with Axis 2 ? 
I also tried to use a proxy parameter in struts2.xml but it doesn't work.
Here is my code: 

ReportingServiceStub stub = new ReportingServiceStub("http://127.0.0.1/ReportServer/ReportService.asmx");
        

HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
        
        auth.setUsername("user");
        auth.setPassword("password");
        auth.setHost("server.fr.domain.com");
        auth.setDomain("domain");
        auth.setPreemptiveAuthentication(false);
        
        
        
        List authPrefs = new ArrayList(1);
        authPrefs.add(AuthPolicy.NTLM);
        auth.setAuthSchemes(authPrefs);
        
        stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE,
auth);
        
        
        com.microsoft.schemas.sqlserver.reporting.reportingservices.ReportingServiceStub.GetReportDefinition
getReportDefinition602=
            (com.microsoft.schemas.sqlserver.reporting.reportingservices.ReportingServiceStub.GetReportDefinition)getTestObject(com.microsoft.schemas.sqlserver.reporting.reportingservices.ReportingServiceStub.GetReportDefinition.class);
        
                getReportDefinition602.setReport("/Galaxy/utilisateur");
                
                assertNotNull(stub.GetReportDefinition(getReportDefinition602));

Thanks


Mime
View raw message