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 7660253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:26:27+00:00 2026-05-31T13:26:27+00:00

I am trying to invoke method via webservice (SOAP) I have generated Web service

  • 0

I am trying to invoke method via webservice (SOAP)

I have generated Web service client with JAX-WS.

I can access the webservice only with transport level security.

I am getting the error:

javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://10.99.36.26:8001/DummySubsForNetwork?wsdl. It failed with: 
    Server returned HTTP response code: 401 for URL: http://10.99.36.26:8001/DummySubsForNetwork?wsdl.
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
    at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:263)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:226)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
    at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
    at javax.xml.ws.Service.<init>(Unknown Source)
    at com.mirs.sbn.esb.client.DummySubsForNetwork_Service.<init>(DummySubsForNetwork_Service.java:67)
    at main.executeEsbRequest(main.java:167)
    at main.testEsb(main.java:141)
    at main.main(main.java:59)

this is my code:

Main method which I am executing:

private static DummySubsForNetwork executeEsbRequest()
    {

        DummySubsForNetwork_Service service = new DummySubsForNetwork_Service();

        DummySubsForNetwork dummyPort = service.getDummySubsForNetworkSOAP();

        Map<String, Object> rc = ((BindingProvider) dummyPort).getRequestContext();

        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "http://some.local.ip:8001/DummySubsForNetwork?wsdl");
        rc.put(BindingProvider.USERNAME_PROPERTY, "csmuser");
        rc.put(BindingProvider.PASSWORD_PROPERTY, "passw0rd");

        return dummyPort;

    }

Auto generated class via JAX-WS:

@WebServiceClient(name = "DummySubsForNetwork", targetNamespace = "http://www.example.org/DummySubsForNetwork/", wsdlLocation = "http://some.local.ip:8001/DummySubsForNetwork?wsdl")
public class DummySubsForNetwork_Service extends Service
{

    private final static URL DUMMYSUBSFORNETWORK_WSDL_LOCATION;
    private final static Logger logger = Logger
            .getLogger(com.mirs.sbn.esb.client.DummySubsForNetwork_Service.class.getName());

    static
    {
        URL url = null;
        try
        {
            URL baseUrl;
            baseUrl = com.mirs.sbn.esb.client.DummySubsForNetwork_Service.class.getResource(".");
            url = new URL(baseUrl, "http://some.local.ip:8001/DummySubsForNetwork?wsdl");
        }
        catch (MalformedURLException e)
        {
            logger
                    .warning("Failed to create URL for the wsdl Location: 'some.local.ip:8001/DummySubsForNetwork?wsdl', retrying as a local file");
            logger.warning(e.getMessage());
        }
        DUMMYSUBSFORNETWORK_WSDL_LOCATION = url;
    }

    public DummySubsForNetwork_Service(URL wsdlLocation, QName serviceName)
    {
        super(wsdlLocation, serviceName);
    }

    public DummySubsForNetwork_Service()
    {
        super(DUMMYSUBSFORNETWORK_WSDL_LOCATION, new QName(
                "http://www.example.org/DummySubsForNetwork/", "DummySubsForNetwork"));
    }

    /**
     * 
     * @return returns DummySubsForNetwork
     */
    @WebEndpoint(name = "DummySubsForNetworkSOAP")
    public DummySubsForNetwork getDummySubsForNetworkSOAP()
    {
        return super.getPort(new QName("http://www.example.org/DummySubsForNetwork/",
                "DummySubsForNetworkSOAP"), DummySubsForNetwork.class);
    }
}

I am getting the execption when I am invoking this method in the class: ‘DummySubsForNetwork_Service’

@WebEndpoint(name = "DummySubsForNetworkSOAP")
    public DummySubsForNetwork getDummySubsForNetworkSOAP()
    {
        return super.getPort(new QName("http://www.example.org/DummySubsForNetwork/",
                "DummySubsForNetworkSOAP"), DummySubsForNetwork.class);
    }

thanks,
ray.

  • 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-31T13:26:27+00:00Added an answer on May 31, 2026 at 1:26 pm

    As commented the solution for this issue was using:

    Authenticator:

    http://stackoverflow.com/questions/496651/connecting-to-remote-url-which-requires-authentication-using-java/496707#496707.

    ray.

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

Sidebar

Related Questions

How can I invoke a service directly from a view? I'm trying with ${my.domain.service.method}
We have consumed a third party web service and are trying to invoke it
When trying to invoke a method on an external webservice (over the Internet) it
I'm trying to invoke the method from this string so that I can ask
I have a service class and i am trying to call the method of
I'm trying to write a simple web service client to interact with my simple
I am trying to invoke a method via reflection with parameters and I get:
I'm trying to invoke business logic via JMX (using 'standard' MBeans) in a web
I'm trying to invoke a method that takes a super class as a parameter
I'm trying to pass via the querysting, the method name to be invoked and

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.