XML Logging: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
Line 12: Line 12:


<blockquote>
<blockquote>
tSomeInput Input
tSomeInput Input<br />
tSomeOutput Output
tSomeOutput Output<br />
String  sXML
String  sXML<br />
 
Get wsSomeOp Input of oXyzService to Output
Get wsSomeOp Input of oXyzService to Output
 
Move (psXML(phoSoapRequest(oXyzService(Self)))) to sXML
Move (psXML(phoSoapRequest(oXyzService(Self)))) to sXML<br />
</blockquote>
</blockquote>


Line 24: Line 24:


<blockquote>
<blockquote>
tSomeInput Input
tSomeInput Input<br />
tSomeOutput Output
tSomeOutput Output<br />
String  sXML
String  sXML<br />
Handle  hoSoapReq
Handle  hoSoapReq<br />
 
Get wsSomeOp Input of oXyzService to Output
Get wsSomeOp Input of oXyzService to Output
 
Get phoSoapRequest of oXyzService to hoSoapReq
Get phoSoapRequest of oXyzService to hoSoapReq<br />
Get psXML of hoSoapReq to sXML
Get psXML of hoSoapReq to sXML<br />
</blockquote>
</blockquote>



Revision as of 14:49, 5 November 2007

Template:Infobox Website

With Service Oriented systems it can be very important to have a log of the XML that has been sent and received by the systems involved, for purposes of determining exactly what went on to cause any given situation (usually an error situation, otherwise there would be no need to look into it). This article looks at how such things can be done and how the logged XML can then be used to investigate the problem.


Web Service Client XML Logging

Logging the XML sent by a web service client is relatively easy. It simply involves, following the service invocation, getting the psXML property of the object pointed to by the phoSoapRequest property of your web service client object. Something like this:

tSomeInput Input
tSomeOutput Output
String sXML

Get wsSomeOp Input of oXyzService to Output

Move (psXML(phoSoapRequest(oXyzService(Self)))) to sXML

Or, more verbosely:

tSomeInput Input
tSomeOutput Output
String sXML
Handle hoSoapReq

Get wsSomeOp Input of oXyzService to Output

Get phoSoapRequest of oXyzService to hoSoapReq
Get psXML of hoSoapReq to sXML

Either way you now have the XML sent

Web Service XML Logging

There is a very real difficulty regarding accessing the XML which is passed it a VDF Web Service (at least so far as revisions up to VDF 12.1 are concerned). The problem is that the original XML is nowhere available to the VDF program. One possible solution would be to employ some kind of HTTP proxy on the server involved, which would receive the XML (actually the HTTP within which the XML is wrapped) before it reached IIS, log that, then pass it on to IIS. However here we are going to look at the best that can be managed from within the VDF programming environment at the moment.

Replaying logged XML