Getting HTTP code 403 error while trying to execute Spotfire API services

I am just trying to call Tibco Spotfire UpdateAnalysisService Web Service through a java program and getting below error while execution:-

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

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

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

at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:217)

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

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

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

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

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

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

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

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

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

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

at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)

at com.sun.proxy.$Proxy31.loadAnalysis(Unknown Source)

at com.nielsen.spotfire.TestServices.main(TestServices.java:49)

Coder Reference from:- https://community.tibco.com/wiki/calling-tibco-spotfire-updateanalysisservice-web-service

Actual Code:-

public class TestServices {

public static void main(String[] args) {

try {

Authenticator myAuth = new Authenticator()

{

@Override

protected PasswordAuthentication getPasswordAuthentication()

{

return new PasswordAuthentication("", "".toCharArray());

}

};

Authenticator.setDefault(myAuth);

UpdateAnalysisServiceImplService test = new UpdateAnalysisServiceImplService(new URL("http://server:/spotfire/ws/pub/UpdateAnalysisService?wsdl"));

UpdateAnalysis ua = new UpdateAnalysis();

ua.setPath("/TAM Local Ops Dashboard/DEV/API POC/ANALYSIS_RPD_DATA2");

test.getUpdateAnalysisServiceImplPort().loadAnalysis(ua);

} catch (MalformedURLException | UpdateAnalysisServiceException...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts