Graham Lovell
Graham Lovell

Reputation: 83

soap inspecting the xml in Delphi

I am trying to understand how to configure a SOAP set of functions for ebXML in DELPHI, but I am stuck at first base.

I have followed Craig Chapman's tutorial (at http://web.archive.org/web/20150822142243/http://chapmanworld.com/2015/03/30/creating-and-consuming-soap-services-in-delphi/) and got it to run OK.

However, I want to see the xml that it is passing when it is running "live", so I can see how close it is to the XML that I am trying to deliver, via SOAP, and to work out how it links to the WSDL that Craig's tutorial has produced.

I can see the WSDL info, but I cannot see the information that the program has passed.

Upvotes: 1

Views: 1705

Answers (2)

Craig Chapman
Craig Chapman

Reputation: 69

I don't monitor Stack Overflow too closely. On my blog I could have answered sooner...

I'd suggest you try running fiddler: https://www.telerik.com/download/fiddler/fiddler4 - It intercepts HTTP traffic and will give you the raw packet information sent back and forth. I find it invaluable for debugging JSON services.

  • Craig Chapman

Upvotes: 0

Graham Lovell
Graham Lovell

Reputation: 83

Create the event and add this code into the WebModule

procedure TWebModule1.WebModuleBeforeDispatch(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
  sl: TStringList;
begin
  sl := TStringList.Create;
  try
    sl.Add(Request.URL);
    sl.Add(Request.InternalScriptName);
    sl.Add(Request.Method);
    sl.Add(Request.ContentFields.Text);
    sl.SaveToFile('c:\temp\temp.txt');
  finally
    sl.Free;
  end;
end;

Upvotes: 2

Related Questions