XML Logging: Difference between revisions
From DataFlex Wiki
Jump to navigationJump to search
m (hmm...) |
m (add syntax highlighting) |
||
Line 6: | Line 6: | ||
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: | 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: | ||
<source lang="ini"> | |||
tSomeInput Input | tSomeInput Input | ||
tSomeOutput Output | tSomeOutput Output | ||
String sXML | String sXML | ||
Get wsSomeOp of oXyzService Input to Output | Get wsSomeOp of oXyzService Input to Output | ||
Move (psXML(phoSoapRequest(oXyzService(Self)))) to sXML | Move (psXML(phoSoapRequest(oXyzService(Self)))) to sXML | ||
</source> | |||
Or, more verbosely: | Or, more verbosely: | ||
<source lang="ini"> | |||
tSomeInput Input | tSomeInput Input | ||
tSomeOutput Output | tSomeOutput Output | ||
String sXML | String sXML | ||
Handle hoSoapReq | Handle hoSoapReq | ||
Get wsSomeOp of oXyzService Input to Output | Get wsSomeOp of oXyzService Input to Output | ||
Get phoSoapRequest of oXyzService to hoSoapReq | Get phoSoapRequest of oXyzService to hoSoapReq | ||
Get psXML of hoSoapReq to sXML | Get psXML of hoSoapReq to sXML | ||
</source> | |||
Either way you now have the XML sent by your web service client and can log it in whatever way you require. | Either way you now have the XML sent by your web service client and can log it in whatever way you require. |