XML Logging: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
Line 28: Line 28:
The trick is to make use of a ''client'' of you service ''within'' the service itself.  This in turn makes doing it a multi-stage process, since one can only create a client once the service is published and accessible.
The trick is to make use of a ''client'' of you service ''within'' the service itself.  This in turn makes doing it a multi-stage process, since one can only create a client once the service is published and accessible.


====Step 1====
====Step 1: Define the Service====
First you define your service:
First you define your service:


Line 39: Line 39:
  End_Object  // oLogSample<br />
  End_Object  // oLogSample<br />


====Step 2====
====Step 2: Create a Client====
Next you need to run the Web Service Client Class Generator (in the VDF Studio: File -> New -> Class -> Clint Web Service Class) on the WSDL for your service (Test Page -> Service Name -> Service Description, then copy the browser's Address window to the Web Service Client Class Generator's WSDL URL window and click "Parse", "Generate Class" and "OK" - plus "Yes" to overwrite if it already exists).
Next you need to run the Web Service Client Class Generator (in the VDF Studio: File -> New -> Class -> Clint Web Service Class) on the WSDL for your service (Test Page -> Service Name -> Service Description, then copy the browser's Address window to the Web Service Client Class Generator's WSDL URL window and click "Parse", "Generate Class" and "OK" - plus "Yes" to overwrite if it already exists).


Line 93: Line 93:


===Issues===
===Issues===
It is important to note that this mechanism '''does ''not'' retrieve the original XML''', but instead ''reconstitutes'' it to the best of its ability from the data passed to the program.
It is important to note that this mechanism '''does ''not'' retrieve the original XML''', but instead ''reconstitutes'' it to the best of its ability from the data passed to the program. There are circumstances where such ''reconstituted'' XML might not match that actually sent to the service, especially if that was mal-formed in terms of the published WSDL service description. Sprcific examples of this are more than one element passed where only one is expected: the program will receive (and hence log) only the first (expected) one and will be totally unaware of (and hence unable to log) any additional ones.


==Replaying logged XML==
==Replaying logged XML==

Navigation menu