How to configure Axis stubs for Integrated Windows Authentication ?

Hi All,
I am trying to consume a web service on https and it uses .NET with Integrated Windows Authentication Security Mechanism. When I type the web service endpoint address in browser I am prompted for a login dialog and I login using username (in the format <domain name>\\<username>) and password given by the web service provider.
Now I have generated stubs using AXIS 1.2 Final but I dont know how to pass or set the credentials (domain, username, password) in my client program. I tried <stub object>.setUsername and <stub object>.setPassword methods but I am not able to connect to the service and I always get HTTP Error Code 401.2 from the service. I am not sure this is right way to set credentials in my code. I tried searching this mailing list but no avail. Can anyone please help me.
Thanks & Regards,
Kr.

Hello all - I ran into this and spent way too much time looking for the answer, however this is how I got it to work. My code was specific to getting SSRS authenication working so it should work with any NTLM authenciation via HTTP. setAuthenticateProperty() actually does the enabling of NTLM.
* Sets up the needed information to enable NTLM authentication for SOAP/HTTP calls..
* @author Brian Hayes
public class NTLMAuthenticator {
    private Authenticator authenticator;
    private String username;
    private String password;
    private String domain;
    private String host;
    private URL wsdlurl;
     * Uses the endpoint.getHost() as the host name to use for authentication.
     * <li> Generally the endpoint host is the target for actual authenciation.
     * <br>
     * @param endpoint -
     *            The URL location of SSRS ReportExecution2005 wsdl.
     * @param username -
     *            User name needed for NTLM authentication.
     * @param password -
     *            Password needed for NTLM authentication.
     * @param domain -
     *            Domain for the user needed for NTLM authentication.
    public NTLMAuthenticator( URL wsdlurl, String username, String password, String domain ) {
        this.wsdlurl = wsdlurl;
        this.host = wsdlurl.getHost();
        this.username = username;
        this.password = password;
        this.domain = domain;
        this.authenticator = null;     
     * Instruct our NTLM authenticator to use setPreemptiveAuthentication or not. Default is true;
     * @return - true or false
    protected boolean usePreemptiveAuthentication(){
        return true;
     * The {@link Authenticator} is used to setup NTLM authentication to a webservice stub/client. <br>
     * Example:<br>
     * If you extended a Stub object, you would call getClient() or your Stub object.<br>
     * Then super._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, getAuthenticator());<br>
     * <li>This should work with any URL/Soap call but it has only been tested with axis2 stubs.
     * <li> This also used PreemptiveAuthentication.
     * @return - {@link Authenticator} object populated.
    public Authenticator getAuthenticator() {
        if (this.authenticator == null) {
            this.authenticator = new Authenticator();
        List<String> auth = new ArrayList<String>();
        auth.add(Authenticator.NTLM);
        authenticator.setAuthSchemes(auth);
        authenticator.setUsername(this.getUsername());
        authenticator.setPassword(this.getPassword());
        authenticator.setDomain(this.getDomain());
        authenticator.setHost(this.getHost());
        authenticator.setPreemptiveAuthentication(this.usePreemptiveAuthentication());
        return authenticator;
    public void setAuthenticator( Authenticator authenticator ) {
        this.authenticator = authenticator;
    public String getUsername() {
        return username;
    public void setUsername( String username ) {
        this.username = username;
    public String getPassword() {
        return password;
    public void setPassword( String password ) {
        this.password = password;
    public String getDomain() {
        return domain;
    public void setDomain( String domain ) {
        this.domain = domain;
    public String getHost() {
        return host;
    public void setHost( String host ) {
        this.host = host;
    public URL getWsdlurl() {
        return wsdlurl;
    public void setWsdlurl( URL wsdlurl ) {
        this.wsdlurl = wsdlurl;
* NTML Support for webservices where our webservice is protected via NTLM.
* @author Brian Hayes
public class NTLMReportExecutionServiceStub extends ReportExecutionServiceStub {
    private NTLMAuthenticator endpointAuthenticator;
     * Enables NTML authentication to our SSRS reports by setting the property via setAuthenticeProperty();
     * @param authenticator
     * @throws AxisFault
    public NTLMReportExecutionServiceStub( NTLMAuthenticator endpointauthenticator ) throws AxisFault {
        this(endpointauthenticator.getWsdlurl().toString());
        this.endpointAuthenticator = endpointauthenticator;
        this.setAuthenticeProperty();
    private void setAuthenticeProperty(){
        super._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, this.getEndpointAuthenticator().getAuthenticator());
    public NTLMAuthenticator getEndpointAuthenticator() {
        return endpointAuthenticator;
    public void setEndpointAuthenticator( NTLMAuthenticator endpointAuthenticator ) {
        this.endpointAuthenticator = endpointAuthenticator;
     * Overrides the default URL location.
     * @param wsdlurl
     * @throws AxisFault
    private NTLMReportExecutionServiceStub( String wsdlurl ) throws AxisFault {
        super(wsdlurl);
}

Similar Messages

  • How do you uncheck the "enable integrated windows authentication" in Mozilla Firefox?

    Every time i want to access a site mozilla uses the windowslogin to authenticate through proxy.

    Hope it helps:
    http://markmonica.com/2007/11/20/firefox-and-integrated-windows-authentication/

  • How to Configure Microsoft loopback adapter in windows 2008

    Hi all,
    I am trying to install SAP IDES 6.0..... while i m trying to install it , it is asking forUnlimited Strength Jurisdiction Policy Files at runtime.
    I do have local and US policy jar file, but i guess its asking for JCE extension file, i dont know about it. so i m not able to proceed
    further. it gives osme error about local host. i think its about Microsoft loopback adapter. can anyone have idea abt it.How to
    Configure Microsoft loopback adapter in windows 2008?
    Can anyone help me ASAP coz i m stucked like anythng.
    thanks
    Cheers

    Hi vinay
    Thanks for reply...I m Installing SAP IDES...with DB2
    I have upload JCE zip file...after clicking next button i m getting following Errors,
    ERROR 2014-10-02 09:52:29
    MOS-01185  The subkey 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DPS' does not exist on the 'localhost' host.
    ERROR 2014-10-02 09:52:29
    FCO-00011  The step collect with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_GetSidNoProfiles|ind|ind|ind|ind|2|0|collect was executed with status ERROR .
    i guess its about Loopback adapter configuration. Still i m not sure... DO u have any idea about it.
    How i can get rid of it.
    Thanks

  • How to Configure the Blackberry Facebook Integrated Applicatio​n

    Hi Friends ,
                How to Configure the Blackberry Facebook Integrated Application while getting the Application Id , Application Secret for Registering the App in Facebook.
                Please Help me , It''s Urgent.
    Thanks & Regards,
    Nagarjuna Metla.
    arjuna

    Bonjour,
    Effectivement, la valeur du filtre de la carte NI-6280 est 40kHz.
    En simulant la carte, j'ai pu faire le test avec le VI joint.
    Si ce VI ne fonctionne pas, quelle est le code d'erreur obtenu et à quelle fonction apparaît-il ?
    Salutations,
    Isabelle
    Ingénieur d'applications
    National Instruments France
    Attachments:
    filtre 6280.vi ‏73 KB

  • Qosmio F60-L10 - How to configure tv tuner with integrated antenna?

    good evening,
    i have a notebook toshiba qosmio f60 ,i had read your answer about tv tuner.
    my question is : how to configure tv tuner with integrated antenna? thanks

    Hi 3171954,
    I think Paolo30 is right. Qosmio F60 is equipped with internal DVB-T but in some cases you need an external antenna to pick up the low signal. In most cases only in large citys you dont need an external antenna. If you live on the fringe of the city, normally a cable is needed.
    Anyway, do you mean an external antenna or external DVB-T receiver (USB stick)?
    Normally Windows media center should recognize the internal DVB-T tuner. Is it listed in device manager? Did you update the driver?

  • How to configure release procedure for rate contracts release

    Dear all,
    How to configure release procedure for rate  contract following are the requirements
    they are two release codes c1 & c2 <=100000,>=100000
                    if  c1 is not there c2 has to be approved
         Change in the value of the rate contract contract
         Change in the validity of the rate contract
         Addition of deletion of line items
    While using a non u2013 released rate contract in the PO an error message should shoot out.
    Also the logic should be changed while using the rate contract in the PO.
    The usage of the rate contract should be till the validity of the rate contract. i.e. the measurement should be end date of the rate contract and the PO creation date and not the delivery date of the PO. &
    It should be possible to refer existing valid rate contracts in purchase orders.
    Regards,
    bhaskar

    Hi,
    In SAP rate contract is known as value contract denoted with wk. The release procedure for rate contract is same as that of other contracts and scheduling agreements. The tables  for contracts will vary with SA (Scheduling agreement) .You may try and maintain condition records based on the customer combination and maintian the validity date of condition records as per your requirement.For contract and PO will have the same header/item table as EKKO/EKPO, and the release
    class in standard is the same FRG_EKKO, you can use the same for contract.
    To distinguish if it's a contract or PO, EKKO-BSART can be used.
    For contract EKKO-BSART will be MK or WK, while PO will have NB/UB etc..
    You can restrict the document type to set up the release strategy for only contract.
    Of cause, you can also create your own release class Z* for contract copying standard
    one FRG_EKKO via CL01/Class type 032, and then assign the class Z* to customizing:
    OLME:
    -> contract
    ->Release Procedure for Contracts
    ->Define Release Procedure for Contracts
    ->Release Groups
    If you have already created the PO release class.
    Assign a new chracteristic of Document Category -BSTYP
    Please check below link for detailed release procedure. I hope this wil help you out .Thanking you.
    http://wiki.sdn.sap.com/wiki/display/ERPSCM/RELEASE+PROCEDURE#RELEASEPROCEDURE-TABLESUSEDFORRELEASEPROCEDURES

  • How to configure Broadcast messaging for IC Webclient profile

    Dear all,
    How to configure Broadcast messaging for IC Webclient profile. what are the prerequisites for it?
    We are not using EP interface for IC Webclient, then where can I find broadcast messaging URL in SAP CRM system.
    I have checked for the relevant BSP application, but could not find.
    Please help me to configure the scenario successfully, your help will be highly appreciated.
    Best regards,
    Raghu ram

    Hi raghu
    In CRM Broad cast messaging application is CRM _BM,
    Go to easy access u2013 go to favourites u2013 select add other objects - select BSP Applications- then select CRM_BM Application.
    Select that BSP application and test it u2026
    `
    Regards,
    Narsimha

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • Microsoft JDBC 2.0 driver for SQL:  Integrated Windows Authentication?

    Has anyone had success with the MS JDBC 2.0 driver for SQL and Integrated Windows Authentication in distributed mode (Multiserver)?  At best, we can get server-to-server authentication.

    Hello Thomas,
    You may want to download the driver again and install it again.
    heres a sample xml tag in the config.xml:
    <JDBCConnectionPool
    DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    InitialCapacity="3" MaxCapacity="12" Name="MSpool"
    Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
    Targets="myserver"
    URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
    ensure that you follow the instructions from Microsoft. For using 2000
    driver you will need to have
    Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
    Install_dir/lib/mssqlserver.jar in the CLASSPATH.
    hth
    sree
    "Thomas" <[email protected]> wrote in message
    news:3c91ec0e$[email protected]..
    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
    the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
    the
    driver.I try viewing the class file from the jar file using the jar utility
    it
    gives an unknown Zip format error.Anybody has any solution for this ?If
    anybody
    has managed to work with this microsoft driver i will be grateful if they
    provide
    me with a solution.
    Thanks
    Thomas

  • How to configure Email notification for User login's in Exchange Infrastructure?

    How to configure Email notification for User login's in Client Machines?

    Hi ,
    Based on the description , you need to assign logon scripts to the end users via group policy and also use your exchange server as the smtp server in that logon script to relay emails to the internal recipients.
    Thanks & Regards S.Nithyanandham

  • How to configure SMTP server for osb 10.3.1

    Hi All,
    Can anyone share information on how to configure SMTP server for osb 10.3.1
    and then how to send an email from osb 10.3.1
    Thanks in Advance!!

    Thanks a lot!!
    I configured the same way. When I am sending email to an account on the same domain as my SMTP server is the sending of email is successful. But its giving error when I am trying to send an emain to an account which is on different domain. It giving error as "Operation has been cancelled"
    Please suggest something.

  • Integrated Windows Authentication with a WebSphere Cliente

    Hi all,
    I need to write a web service client that connects to a .NET Web Service that is configured to use Integrated Windows Authentication (NTLM).
    I'm using the IBM WebSphere Runtime environment for the client and using the web service client wizard in the RSD 6.0.1.
    When I try to call a method in the .NET web service, I get the error shown below. If I configure the .NET web service to permit Anonymous Access, my client works fine.
    Does anybody know if the WebSphere web services engine supports Integrated Windows Authentication? If so, how can I configure my cliente to pass my credentials? Do people use this type of authentication if the web service will be called by non Windows clientes or is it better to use Basic Authentication with HTTPS or digital certificates?
    I've read that Apache Axis can be configured to use integrated windows authentication (http://people.etango.com/~markm/archives/2005/11/21/using_apache_axis_with_integrated_windows_security.html) by using a different HTTP transport class (CommonsHTTPSender).
    Thanks in advance!
    Craig
    [14/06/06 10:06:56:805 GMT-03:00] 00000031 enterprise I WSWS3243I: Info: Mapping Exception to WebServicesFault.
    [14/06/06 10:06:56:821 GMT-03:00] 00000031 enterprise I TRAS0014I: The following exception was logged WebServicesFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: java.lang.StringIndexOutOfBoundsException
    faultActor: null
    faultDetail:
    java.lang.StringIndexOutOfBoundsException
         at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:179)
         at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:490)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:274)
         at com.ibm.ws.webservices.engine.client.Connection.invokeEngine

    Here's a project ( [http://spnego.sourceforge.net/protected_soap_service.html|http://spnego.sourceforge.net/protected_soap_service.html] ) that shows how to write a soap client that can connect to a soap web service with integrated windows authentication turned on.

  • Class Not Found. "Integrated Windows Authentication"

    Hello out there!
    I have read several posts concerning almost the same problem I have, but couldn't find a solution:
    IIS + PlugIn 1.4.1 installed.
    If the IIS is configured not to provide Basic Authentcation, but only "Integrated Windows Authentication", following error occurs:
    java.lang.ClassNotFoundException: de.mypackage.myclass.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at sun.plugin.security.PluginClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    "Integrated Windows Authentication" is a must, so I have to turn it on, but it is possible, that basic authentication is not allowed. Any suggestions or ideas?

    In IIS you can set the security mechanism down to the file level. Try turning off integrated Windows authentication for the jar files. This can be done in the IIS administrative tool by going to your virtual directory and right clicking the jar file and selecting 'Properties'.
    Gerald

  • Integrated Windows Authentication

    Hi All
    I need to implement Integrated Window Authentication in  EP7.0( SP16 ).
    Please help me to proceed further.
    Thanks & Regards
    Karthi

    Hi ,
    Check SPNego installation guide at help.sap.com for more information.
    check below blogs
    Configuring and troubleshooting SPNego -- Part 1
    Configuring and troubleshooting SPNego -- Part 2
    Configuring and troubleshooting SPNego -- Part 3
    kerberos implementation with ADS made easy
    Koti Reddy

  • SAAJ (Web Service Client) and Integrated windows Authentication

    Hello
    I have build a web service client using SAAJ, the Web services is deployed on MS IIS. Every thing seems to work fine, The problem appears when I apply directory security on the Web Service Directory. When I apply Basic authentication SAAJ manages to send the user name and password and it goes fine, but when I apply Integrated Windows Authentication, I always get a response Access is Denied.
    I know we can authenticate the user credentials from NTLM from JAAS but here I am using a web services client.
    My Question is How can we pass the user credentials through a web service client to the IIS when the directory security is Windows Integrated Authentication?
    Any work around or the solution will be appreciated.
    Thanks :-)
    Syed Saulat

    Hi Gilles,
    Thank you very much for your answer. Actually, I think the problem is a little bit different. The kerberos server is not delivering a "grant" ticket to the client for the service provided by the VIP, because the CSS didn't register to the Active Directory, as a normal W2K web server would. The first thing the client does when he wants to access a web server behind the CSS is to ask the kerberos server for a "gtanting" ticket for that service. So the problem arise before the client sends any packet to the CSS (therefore I think it is more a Microsoft problem rather than a CSS problem).
    But for sure, other people have this environment I suppose...
    What is your opinion on this ?
    Yves

Maybe you are looking for

  • How do I get my Mac Mail signature to be single spaced close together and not what looks like a double space?

    I am using Mac Mail on Mac Air  with 10.10.  I have a multi line signature but it looks double spaced and I can't get it to look like a single spaced signature.  I tried different fonts and sizes. Appreciate your assistance. Fran

  • Radius Authorization question

    Can you configure Radius authorization to access a router or not. I am confused because the Practical Studies book says "Use the local database for authorization instead of RADIUS because is incapable of understanding CLI": aaa new-model aaa authenti

  • ITS 6.20 patch 18 ALV Grid problems

    Hi, We are in the midst of testing the ITS 6.20 patch 18 with EP6 SP12 and we have run into some problems that were not evident with 6.10.  First.  With IAC PP_MY_REQUIREMENTS (Requirements Profile) and PP_MY_PROFILEMATCHUP (Profile Matchup), there i

  • Two week old refurb i7 has "died"

    I put died in quotes because it isn't totally dead. Here's what happened. I had been using Safari for quite some time. I decided to watch a TV show I had in iTunes. iTunes was already running. I selected the TV show I wanted to watch and double click

  • Portal Forms Reports Discoverer Install create domain failure ...

    Hi, I'm trying to configure 11g Forms and Reports, and keep getting the 'create domain' failure message. I have read many threads and tried the work-arounds as suggested, but I still get this failure. System config :- Linux 32 bit RHEL 5, plenty of r