Powered By Blogger

Thursday 16 April 2009

Code response to su mus (samuschen@gmail.com) [Google-Docs-Data-APIs] Re: no object DCH for MIME type application/atom+xml

This is my source code in Java and it successfully uploads a .doc, .xml, .wsdl etc..document to google docs.


You may replace the following
1. jTexAreaMSG.append(chooser.getSelectedFile().getName() + " sucessfully uploaded to google docs") with a System.out.println();
2. service.setUserCredentials(txtUser.getText(), new String(txtPass.getPassword())); you can hard code your User credentials, Here I am using a GUI so I used JPasswordField and JTextField

All the best Su Mus,
Agbebiyi B.A

3 comments:

  1. In response to your request on google groups, try

    Ok I have same ANT version,
    Specify path of activation.jar and mail.jar in C:\gdata-src.java-1.30.0.java\gdata\java\build-src\build.properties
    Mine looks like this
    # Points to a external library dependancies
    # EDIT-THIS: If rebuilding the authsub or gbase/recipe sample point to,
    # servlet jar in Sun's Servlet API library.
    servlet.jar=D:\servlet-api.jar
    # EDIT-THIS: Point to mail.jar lib in Sun's Java Mail API.
    mail.jar=D:\mail.jar
    # EDIT-THIS: If using version older than JDK 1.6,
    # Point to activation.jar in Sun's activation framework library.
    activation.jar=D:\activation.jar

    # Include debugging information in built library files. Possible values "on" or "off"
    javac.debug=true
    javac.debuglevel=lines,vars,source


    ..\gdata-src.java-1.30.0.java\gdata\java\build-src.xml

    open cmd, type
    ant -f (full path of your gdata build-src.xml file)
    Mine looks like this
    ant -f "C:\Program Files\NetBeans 6.5.1\Downloaded libs-jide\gdata-src.java-1.30.0.java\gdata\java\build-src.xml"

    Please post comments

    ReplyDelete
  2. Hi,B.A:
    It`s so useful a message that I worked out my problem at last.Thanks a lot.

    Best Wishes!
    Samuschen

    ReplyDelete
  3. I am glad it helped!
    happy coding! :-)

    ReplyDelete