Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

Getting com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 403: Forbidden exception when accessing Copy webservice

$
0
0

Hi Guys,

I have Java application to upload documents to Office 365. I am consuming Copy webservice of this url "https://chebrolu-my.sharepoint.com/_vti_bin/Copy.asmx?wsdl" to upload document to Office 365.

But when I try to upload document, I am getting the an exception when I call the below method.

port.copyIntoItems(sourceUrl, destinationUrlCollection, fields,byteArray , longHolder, resultHolder);

where,

sourceurl : C://Users//hchebrolu//Desktop//doubts.txt

destinationUrlCollection : Collection that contains an URL of destination https://chebrolu- my.sharepoint.com/personal/chebrolu_chebrolu_onmicrosoft_com/Documents/Testing/ (Here Testing is a folder created by me under "My Documents" in OneDrive).       byteArray : contains the byteArray of text file.                       

The Exception I am getting when this method is called, is as below,

com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 403: Forbidden
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:196)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:168)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
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:107)
at $Proxy31.copyIntoItems(Unknown Source)
at com.jw.sharepoint.examples.SharePointBaseExample.uploadDocument(SharePointBaseExample.java:235)
at com.jw.sharepoint.examples.SharePointUploadDocumentExample.main(SharePointUploadDocumentExample.java:23)

Please help me resolve this exception. 

Note : I am using Windows7 OS.

Thanks in advance


Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>