dinshetty wrote:
>
> Hi,
>
> I need to upload power point documents to sharepoint using java. I created
> java files using Imaging.asmx.
> I tried to upload as below.
>
> Upload anUpload = new Upload();
>
> anUpload.setStrListName("%7B0868F928%2D0355%2D40B3%2DA13B%2DB5B008324B36%7D");
>
> //anUpload.setStrFolder(strFolder)
> File aFile = new File("Z:\\CEO Certification\\CEO from
> shine\\TemplateNWBC_Clone.ppt");
> byte[] fileBArray = new byte[(int)aFile.length()];
> FileInputStream fis = new FileInputStream(aFile);
> fis.read(fileBArray);
>
> anUpload.setBytes(fileBArray);
> anUpload.setFileName("tempClone.ppt");
>
> ImagingSoap12Stub soap = (ImagingSoap12Stub)new
> ImagingLocator().getImagingSoap12();
> soap.setUsername("domain/username");
> soap.setPassword("passwd");
> //soap.setHeader(new SOAPHeaderElement().);
>
> UploadResponse anUploadResponse = soap.upload(anUpload);
>
>
> But I got the error on the console as below,
>
> AxisFault
> faultCode: {http://www.w3.org/2003/05/soap-envelope}Server.userException
> faultSubcode:
> faultString: org.xml.sax.SAXException: Processing instructions are not
> allowed within SOAP messages
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> Processing instructions are not allowed within SOAP messages
> at
> org.apache.axis.encoding.DeserializationContext.startDTD(DeserializationContext.java:1161)
> at org.apache.xerces.parsers.AbstractSAXParser.doctypeDecl(Unknown
> Source)
> at org.apache.xerces.impl.dtd.XMLDTDValidator.doctypeDecl(Unknown
> Source)
> at org.apache.xerces.impl.XMLDocumentScannerImpl.scanDoctypeDecl(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> at
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
>
> Please advice to resovle this issue.
>
--
View this message in context:
http://www.nabble.com/Uploading-ppt-to-Sharepoint-using-java-tp19331690p19371788.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]