Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 08-06-2010
Avatar de erickahr
erickahr erickahr is offline
Miembro
 
Registrado: feb 2010
Posts: 94
Poder: 17
erickahr Va por buen camino
Red face Hola

Sigo con el problema, he encontrado en al API la siguiente info:
Cita:
Creating an empty document

Here is an example of creating a document by uploading metadata to the server with an HTTP POST request. This will create an empty document called new document on Google Documents.
POST /feeds/default/private/full HTTP/1.1Host: docs.google.comGData-Version: 3.0Content-Length: 287Content-Type: application/atom+xml<?xml version='1.0' encoding='UTF-8'?><entry xmlns="http://www.w3.org/2005/Atom"> <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/docs/2007#document"/> <title>new document</title></entry>
he puesto este codigo en mi aplicacion pero me da un error de autenticacion, aunque el asunto del acceso esta resuelto ya que si puedo añadir informacion a una hoja previamente creada.

Código Delphi [-]
procedure TfrMain.btnCrearClick(Sender: TObject);
var
  res, StrData, FromAttr: String;
  postStream: TStream;
  resStream: TStringStream;
begin
  fromAttr:='http://docs.google.com';

 StrData:='+QuotedStr('1.0')+' encoding=' +QuotedStr('UTF-8')+ '?> '+
           ' '  +
             '+
                'term="http://schemas.google.com/docs/2007#document"/> ' +
             'new document '  +
           '  ';

  try
    Altas.Request.CustomHeaders.Values ['Authorization'] := 'GoogleLogin auth=' + googleAuth.AuthString;
    Altas.Request.CustomHeaders.Values ['Content-type'] := 'application/atom+xml';
    Altas.Request.CustomHeaders.Values ['GData-Version'] := '2.0';

    Altas.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(Altas);
    postStream := TStringStream.Create (strData);
    showmessage(StrData);

    postStream.Position := 0;
    res := Altas.Post (fromAttr, postStream);
    showmessage(res);
  Except
    on e: Exception do
      Showmessage(e.ClassName+': '+e.Message);
  end;
end;

Vuelvo a poner esta parte porque en la parte de arriba no me lo respeta, no se porque, en edicion se ve completo pero ya guardado aparece incompleto.

StrData:='<?xml version='+QuotedStr('1.0')+' encoding=' +QuotedStr('UTF-8')+ '?> '+
'<entry xmlns="http://www.w3.org/2005/Atom"> ' +
'<category scheme="http://schemas.google.com/g/2005#kind" '+
'term="http://schemas.google.com/docs/2007#document"/> ' +
'<title>new document</title> ' +
'</entry> ';

Sigo esperando que alguien me pueda ayudar, Saludos y gracias de antemano.
__________________
Nadie puede separar su fe de sus actos, o sus creencias de sus afanes

Última edición por erickahr fecha: 08-06-2010 a las 01:25:54. Razón: falto codigo por postear
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
http://docs.codegear.com/ (Beta) Neftali [Germán.Estévez] Noticias 8 03-08-2008 09:56:58
Crear libro Excel con sheets en docs diferentes Gaya Servers 0 07-07-2008 03:24:49
Google demanda a Microsoft por las interferencias que Vista genera en Google Desktop Casimiro Noteví Noticias 4 12-06-2007 18:53:42
Google Phone será el nuevo teléfono de Google jhonny La Taberna 2 17-03-2007 21:51:04
Al imprimir docs.word con shellexecute..... Javier_A OOP 4 18-01-2006 16:59:22


La franja horaria es GMT +2. Ahora son las 12:55:42.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi