Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 728159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:38:58+00:00 2026-05-14T06:38:58+00:00

I managed to upload a file (crud PUT khe khe :) from Linux to

  • 0

I managed to upload a file (crud PUT khe khe 🙂 from Linux to Sharepoint.
The absolute path of the file is:

http://myhost/mysite/reports/2010-04-13/file.txt

Now, I’m trying to add some metadata to the file:

from suds.transport.https import WindowsHttpAuthenticated
url='http://myhost/mysite/_vti_bin/lists.asmx?WSDL'
n=WindowsHttpAuthenticated(username='me',password='password')
from suds.client import Client
c=Client(url,transport=n)

xml="""<Batch OnError='Continue' PreCalc='' ListVersion='0'>
<Method ID='1' Cmd='Update'>
    <Field Name='ID'/>
    <Field Name='FileRef'>%s</Field>
    <Field Name='Jurisdiction'>%s</Field>
</Method>
</Batch>"""
fn = 'http://myhost/mysite/reports/2010-04-13/file.txt'
print c.service.UpdateListItems('reports',xml % (fn,'UK'))

The code returns:

soap:Server

… and nothing happens.
Am I missing anything? Is there any other way to do it?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:38:58+00:00Added an answer on May 14, 2026 at 6:38 am

    Found it! 🙂

    Instead of a plain text XML one must use DOM objects, something like this:

    b = Element("Batch")
    b.append(Attribute("OnError","Continue")).append(Attribute("ListVersion","3"))
    bm= Element("Method")
    bm.append(Attribute("ID","1")).append(Attribute("Cmd","Update"))
    bm.append(Element("Field").append(Attribute("Name","ID")).setText(''))
    bm.append(Element('Field').append(Attribute('Name','FileRef')).setText('http://.....'))
    bm.append(Element('Field').append(Attribute('Name','Jurisdiction')).setText('UK'))
    bm.append(Element('Field').append(Attribute('Name','Desk')).setText('Structured Equity Derivatives'))
    bm.append(Element('Field').append(Attribute('Name','Business Area')).setText('Back Office'))
    bm.append(Element('Field').append(Attribute('Name','Title')).setText('whatever'))
    b.append(bm)
    u = Element("ns1:updates")
    u.append(b)
    c.service.UpdateListItems("Reports",u)
    

    Now it works perfect!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My website was infected by a trojan script. Somebody managed to create/upload a file
I am developing an web application which can upload/download a file from client to
I want to upload images from the client to the server. I already managed
I have sucessfully managed to make a file upload system which basically is copying
I've managed to create a button that adds a file upload field, a button
What function in Drupal gets file attachment path? Edit: the attachments provided by Upload
I've recently managed to successfully plug the very cool Valums File Upload Plugin into
I downloaded the File upload script called Simple Photo Manager. Since I'm more familiar
I managed to apply this excellent example to my needs: http://code.google.com/p/galleriffic/issues/attachmentText?id=76&aid=-3045121742886940548&name=example-2.html&token=4nlvmgAfVpc5whcXC9UEqHZaSz0%3A1339257750721 With a small
I managed to request the publish_actions permission, but since it is revocable from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.