Differences

This shows you the differences between two versions of the page.

Link to this comparison view

public:howto:synapsesoap [2009/04/03 07:57]
tibard
public:howto:synapsesoap [2009/04/03 09:23] (current)
tibard
Line 128: Line 128:
   procedure SetupSyna(SynaHttp: THTTPSend);   procedure SetupSyna(SynaHttp: THTTPSend);
   var   var
-    ActionHeader: string; 
     Protocol, Host, Path, Port, Para, pUser, pPass: string;     Protocol, Host, Path, Port, Para, pUser, pPass: string;
   begin   begin
 +
     if FBindingType = btMIME then     if FBindingType = btMIME then
     begin     begin
Line 144: Line 144:
     SynaHttp.UserName := FUserName;     SynaHttp.UserName := FUserName;
     SynaHttp.Password := FPassword;     SynaHttp.Password := FPassword;
-    +
     if FProxy <> '' then     if FProxy <> '' then
     begin     begin
Line 153: Line 153:
       SynaHttp.ProxyPass := pPass;       SynaHttp.ProxyPass := pPass;
     end;     end;
-    SynaHttp.Protocol := '1.0' ; + 
-    SynaHttp.UserAgent := Self.FAgent;+    SynaHttp.Protocol := '1.0'; 
 +    SynaHttp.UserAgent := 'CustomSoap';
   end;   end;
- 
  
   procedure PostData(const Request: TStream; Response: TStream);   procedure PostData(const Request: TStream; Response: TStream);
Line 165: Line 165:
     try     try
       SetupSyna(SynaHttp);       SetupSyna(SynaHttp);
 +      
       Request.Position := 0;       Request.Position := 0;
       SynaHTTP.Document.LoadFromStream(Request);       SynaHTTP.Document.LoadFromStream(Request);
       SynaHTTP.Document.Position := 0;       SynaHTTP.Document.Position := 0;
-      try + 
-        if SynaHTTP.HTTPMethod('POST', FURL) then +      if SynaHTTP.HTTPMethod('POST', FURL) then 
-          Response.CopyFrom(SynaHTTP.Document, 0) +      begin 
-        else +        Response.CopyFrom(SynaHTTP.Document, 0)
-          raise ESOAPHTTPException.Create(SInvalidHTTPResponse);         + 
-      finally +        FContentType := SynaHTTP.Headers.Values[SContentType]; 
-      end;+        FMimeBoundary := GetMimeBoundaryFromType(FContentType); 
 + 
 +        CheckContentType; 
 +      end 
 +      else 
 +        raise ESOAPHTTPException.Create(SInvalidHTTPResponse); 
 +        
     finally     finally
       FreeAndNil(SynaHTTP);       FreeAndNil(SynaHTTP);
public/howto/synapsesoap.1238738255.txt.gz · Last modified: 2009/04/03 07:57 by tibard
Driven by DokuWiki Recent changes RSS feed