jai_dgl has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I have to access share point server and upload a file. Using the following SOAP.
Can any one help me out to achieve this ?
thanks in advance
Jey

POST /_vti_bin/Copy.asmx HTTP/1.1 Host: hyd-pi1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://ww +w.w3.org/2003/05/soap-envelope"> <soap12:Body> <CopyIntoItems xmlns="http://schemas.microsoft.com/sharepoint/soap +/"> <SourceUrl>Sample.txt</SourceUrl> <DestinationUrls> <string>string</string> <string>string</string> </DestinationUrls> <Fields> <FieldInformation Type="" DisplayName="string" InternalName="s +tring" Id="guid" Value="string" /> <FieldInformation Type="" DisplayName="string" InternalName="s +tring" Id="guid" Value="string" /> </Fields> <Stream>base64Binary</Stream> </CopyIntoItems> </soap12:Body> </soap12:Envelope>

The Response Should Be

HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://ww +w.w3.org/2003/05/soap-envelope"> <soap12:Body> <CopyIntoItemsResponse xmlns="http://schemas.microsoft.com/sharepo +int/soap/"> <CopyIntoItemsResult>unsignedInt</CopyIntoItemsResult> <Results> <CopyResult ErrorCode="Success or DestinationInvalid or Destin +ationMWS or SourceInvalid or DestinationCheckedOut or InvalidUrl or U +nknown" ErrorMessage="string" DestinationUrl="string" /> <CopyResult ErrorCode="Success or DestinationInvalid or Destin +ationMWS or SourceInvalid or DestinationCheckedOut or InvalidUrl or U +nknown" ErrorMessage="string" DestinationUrl="string" /> </Results> </CopyIntoItemsResponse> </soap12:Body> </soap12:Envelope>

Replies are listed 'Best First'.
Re: Upload File to Sharepoint Using SOAP
by bluescreen (Friar) on Jul 21, 2010 at 17:32 UTC
Re: Upload File to Sharepoint Using SOAP
by ahmad (Hermit) on Jul 21, 2010 at 15:25 UTC

    There are many SOAP related modules on CPAN, choose the one that works for you and TRY ... then feel free to post back when you have some errors or difficulties

    You did not show any effort attempting to do the job yourself

      Please Look in to my previous posting

      http://www.perlmonks.org/?node_id=849170
      http://www.perlmonks.org/?node_id=848426