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

  • SEARCH
  • Home
  • 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 8075029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:51:16+00:00 2026-06-05T14:51:16+00:00

I am coding for consuming Sharepoint 2010 web services in Java using Netbeans. I

  • 0

I am coding for consuming Sharepoint 2010 web services in Java using Netbeans. I am able to creating the web service client from WSDL using the provided wizard. When I call the following code I get the Microsoft.SharePoint.SoapServer.SoapServerException

import java.net.Authenticator;
import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;

import proxy.webs.GetWebCollectionResponse;
import proxy.webs.GetWebResponse;
import proxy.webs.Webs;
import proxy.webs.WebsSoap;

public class AccessLists {

    public static void main(String[] args) throws Exception {
        String username = "domain\\Administrator";
        char[] password = "password".toCharArray();
        NtlmAuthenticator ntlmAuth = new NtlmAuthenticator(username, password);
        Authenticator.setDefault(ntlmAuth);

        Webs websService = new Webs(new URL("http://servername:7766/_vti_bin/Webs.asmx?wsdl"));
        WebsSoap webPort = websService.getWebsSoap();
        GetWebResponse.GetWebResult webRes = webPort.getWeb("http://servername/sites/Test1");
        System.out.println(webRes);
    }
}

The site http://servername/sites/Test1 exists and I can open it in the browser.

Update 1: Similar thing happens for C# code, which I run on the same machine as Sharepoint 2010:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Webs webService = new Webs();
            webService.Credentials = System.Net.CredentialCache.DefaultCredentials;
            Object o = webService.GetWeb("http://servername/sites/Test1");
            Console.WriteLine(o.ToString());
        }
    }
}

I guess this is the problem with the set up and not with the code.

  • 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-06-05T14:51:17+00:00Added an answer on June 5, 2026 at 2:51 pm

    I was using the wrong endpoint for the web service. For the Sharepoint site http://servername/sites/Test1 the endpoint should also be http://servername/sites/Test1/_vti_bin/Webs.asmx?wsdl

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Coding i came around to check for the vararg performance of Java. I write
After coding and testing a Java application (lets say with Eclipse, but not necessarily)
We are in the beginning coding phase for project that we are using JPA
Im am not new to WCF web services but there has been a couple
I am using SPServices to do autocomplete and can pull from different lists. The
I'm reading some books about coding standard in Java. I always loved beautiful and
My team has recently started using Lance Hunt's C# Coding Standards document as a
I'm doing IPC between Java and some C code by just creating an external
I'm in charge of creating coding standards and doing code reviews within my organization.
I Made an application to download a folder from a given sharepoint site, but

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.