XML Logging: Difference between revisions

m
Changed blue to midnightblue and font {deprecated} to span+style
m (Changedblue to midnightblue and <font> to <span + style>)
m (Changed blue to midnightblue and font {deprecated} to span+style)
Line 38: Line 38:
   { Description = "Interface for sending something to the system" }
   { Description = "Interface for sending something to the system" }
   Procedure  SendSomething tSomeDocumentType Doc<br />
   Procedure  SendSomething tSomeDocumentType Doc<br />
       <font color="green">// Code that actually does stuff...</font><br />
       <span style="color:green;">// Code that actually does stuff...</span><br />
   End_Procedure  <font color="green">// SendSomething</font><br />
   End_Procedure  <span style="color:green;">// SendSomething</span><br />
  End_Object  <font color="green">// oLogSample</font><br />
  End_Object  <span style="color:green;">// oLogSample</span><br />


====Step 2: Create a Client====
====Step 2: Create a Client====
Line 65: Line 65:
   Use cWSLogSample.pkg
   Use cWSLogSample.pkg
   Object oOwnService is a cWSLogSample
   Object oOwnService is a cWSLogSample
   End_Object  <font color="green">// oOwnService</font><br />
   End_Object  <span style="color:green;">// oOwnService</span><br />
   <font color="green">// LogMsg: The arguments are - 1 Data passed to the method
   <span style="color:green;">// LogMsg: The arguments are - 1 Data passed to the method
   //                            2 Name of the method (literal)
   //                            2 Name of the method (literal)
   //                            3 Name of the variable (literal)
   //                            3 Name of the variable (literal)
   //                            4 Object handle for type - which will be named "oWS{typeName}"</font>
   //                            4 Object handle for type - which will be named "oWS{typeName}"</span>
   <font color="blue">Procedure LogMsg Variant Data String sOp String sName Handle hoObj
   <span style="color:midnightblue;">Procedure LogMsg Variant Data String sOp String sName Handle hoObj
       tSoapParameter Param
       tSoapParameter Param
       Handle  hoXML hoDoc
       Handle  hoXML hoDoc
Line 83: Line 83:
       Send Destroy of hoDoc
       Send Destroy of hoDoc
       Send Destroy of hoXML<br />
       Send Destroy of hoXML<br />
       <font color="green">// Now you can log sXML in some way...</font><br />
       <span style="color:green;">// Now you can log sXML in some way...</span><br />
   End_Procedure</font>  <font color="green">// LogMsg</font><br />
   End_Procedure</span>  <span style="color:green;">// LogMsg</span><br />
   { Published = True  }
   { Published = True  }
   { Description = "Interface for sending something to the system" }
   { Description = "Interface for sending something to the system" }
   Procedure  SendSomething tSomeDocumentType Doc
   Procedure  SendSomething tSomeDocumentType Doc
       <font color="blue">Send LogMsg Doc "SendSomething" "Doc" (oWStSomeDocumentType(oOwnService(Self)))</font><br />
       <span style="color:midnightblue;">Send LogMsg Doc "SendSomething" "Doc" (oWStSomeDocumentType(oOwnService(Self)))</span><br />
       <font color="green">// Code that actually does stuff...</font><br />
       <span style="color:green;">// Code that actually does stuff...<span><br />
   End_Procedure  <font color="green">// SendSomething</font><br />
   End_Procedure  <span style="color:green;">// SendSomething</span><br />
  End_Object  <font color="green">// oLogSample</font><br />
  End_Object  <span style="color:green;">// oLogSample</span><br />


'''Warning:''' Note that each time you change your service, you should regenerate the web service client (as in [[#Step_2:_Create_a_Client | Step 2]]) immediately afterwards and then recompile your WebApp... <u>again</u>!
'''Warning:''' Note that each time you change your service, you should regenerate the web service client (as in [[#Step_2:_Create_a_Client | Step 2]]) immediately afterwards and then recompile your WebApp... <u>again</u>!