1

I can't resolve this problem, i try to do import com.sun.xml.internal.ws.client.ClientTransportException but i can't import it.

Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 404: Not Found

at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:296)

at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:245)

at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.j
ava:203)

at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:122)

at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95)

at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:626)

at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:585)

at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:570)

at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:467)   

at com.sun.xml.internal.ws.client.Stub.process(Stub.java:308)

at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:146)

at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)

at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)

at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:129)
MPelletier
  • 16,256
  • 15
  • 86
  • 137
Jorge Rocha
  • 724
  • 3
  • 12
  • 30

3 Answers3

7

You shouldn't try to import the "internal" package. It's not available by design.

See this similar question for more details, and a way to override the missing import temporarily for testing, or if you have special requirements: com.sun.xml.internal.ws.client does not exist

Really though, you'll want to use the publicly available parts of the API, not the internal.

Community
  • 1
  • 1
Charlie Collins
  • 8,806
  • 4
  • 32
  • 41
1

You should check WSDL url is a valid or not It means, in Web service client class. see above code.

static {
    URL url = null;
    WebServiceException e = null;
    try {
        url = new 
        URL("http://localhost:8084/SoapServer_test_4/CustomerService?wsdl");
    } catch (MalformedURLException ex) {
        e = new WebServiceException(ex);
    }
    CUSTOMERSERVICE_WSDL_LOCATION = url;
    CUSTOMERSERVICE_EXCEPTION = e;
}

in above code, check the WSDL url is a valid or not, or check WSDL is already hosted in that url. if your wsdl file is in your local pc, check it run like below image you can see the wsdl url in your browser like this when you test the webservice

enter image description here

toha
  • 5,095
  • 4
  • 40
  • 52
Vibhath
  • 44
  • 3
0

You can use jaxws-rt.jar for this purpose. rt.jar in jre system library will restrict compiler to access some of its packages.