Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:50:46+00:00 2026-05-27T05:50:46+00:00

I have to call SharePoint 2010 Lists service from a Java client. I used

  • 0

I have to call SharePoint 2010 Lists service from a Java client.

I used NetBeans to generate the JAX-WS classes from the WSDL.

And extended java.net.Authenticator to manage the authentication to SharePoint :

static final String user = "XXXXXXXX\\Administrateur"; // your account name
static final String pass = "mypassw"; // your password for the account

static class MyAuthenticator extends Authenticator {
        public PasswordAuthentication getPasswordAuthentication() {
            System.out.println("Feeding username and password for " + getRequestingScheme());
            return (new PasswordAuthentication(user, pass.toCharArray()));
        }
    }

Calling the web service with JAX-WS :

Authenticator.setDefault(new MyAuthenticator());

com.nm.Lists service = new com.nm.Lists();

com.nm.ListsSoap port = service.getListsSoap12();

String pageUrl = "http://xxxxxxx/testPushFile.txt";
String comment = "no comment";
String checkinType = "1";

boolean result = port.checkInFile(pageUrl, comment, checkinType);

I am still getting the error :

Exception in thread "main" javax.xml.ws.WebServiceException: java.io.IOException: Authentication failure
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(HttpClientTransport.java:201)

Because it isn’t working I tried :

  • to set the user without the domain

  • to set the domain as a system property : System.setProperty("http.auth.ntlm.domain", "XXXXXXXX");

  • to authenticate “old-fashioned way” :

      
    ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);
    ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, pass);

Any ideas what's the problem with authentication ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:50:47+00:00Added an answer on May 27, 2026 at 5:50 am

    I am coming back to give the solution. Here is what I have done to make the Web Service authentication work :

    • I enabled Basic Authentication in IIS Manager for my SharePoint Site,
    • I used a user credentials that was registred in Windows Domain
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call a SharePoint web service from Acrobat JavaScript, and I
I'm trying to learn to call SharePoint Web Services from an external C# client.
Is there a way to prevent the UpdateListItems() web service call in SharePoint's Lists.asmx
i have wcf service hosed in sharepoint application. But when i try to call
I have this xml/soap from a sharepoint webservice call: <GetAllUserCollectionFromWeb xmlns=http://schemas.microsoft.com/sharepoint/soap/directory/> <Users> <User ID=ID
I have to call some code in a SharePoint site that runs under the
I have to call ping from c++ code.I'd like to easily read the output
Scenario :- I have to call MYSQL stored procedure from PHP and do some
I'm using AJAX to send a web service call to Sharepoint to retrieve list
I have a web service that is being hosted in SharePoint. The WebService is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.