the WRITE is just to visualize the example

the loop in YOUR class could be: 

 for msg=1:1 set msg(msg)=stream.ReadLine() quit:stream.AtEnd 


but that's just standard COS programming. Nothing special. see here
Then you have the local array msg with your SOAP message
Similiar the Try{ } Catch {}  construct that ignores the error that you experience as you don't get a real SOAP response here.

You may create a normal SOAP Client in Studio using the Wizard.

Then you add a transport class to display / dump your request. (example in SAMPLES)

Class SOAPDemo.Transport Extends %RegisteredObject
{
ClassMethod DoSOAPRequest(
 client As %SOAP.WebClient,
 Action As %String,
 OneWay As %Boolean = 0,
 stream As %FileBinaryStream,
 ByRef responseStream As %GlobalBinaryStream) As %Status
{

    write !,"**** SOAP Request Begin ****",!
    for  write stream.ReadLine(),! quit:stream.AtEnd
    write !,"**** SOAP Request End ****",!
    quit 
$$$OK
}
}

Example to use it :

SAMPLES>set soap=##class(SOAP.DemoProxy).%New()
 
SAMPLES>set soap.Transport=##class(SOAPDemo.Transport).%New()  ;; add cusomized transport
 
SAMPLES>try {write !,soap.Mission() } catch {}    ;; you don't get a reply, so ignore it
  
**** SOAP Request Begin ****
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema'>  
<SOAP-ENV:Body><Mission xmlns="http://tempuri.org"></Mission></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

**** SOAP Request End ****
 
SAMPLES>try {write !,soap.AddInteger(17,4) } catch {}
 
**** SOAP Request Begin ****
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema'>  
<SOAP-ENV:Body><AddInteger xmlns="http://tempuri.org"><Arg1>17</Arg1><Arg2>4</Arg2></AddInteger></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
**** SOAP Request End ****

 

so you get Envelope + Body well separated

That makes it more clear, but not easier.

Class  %SOAP.WebClient  is the base for any SOAP Client in Caché.
It has a property Transport to provide a registered class for alternate transport (or no immediate transport in your case)

check the code starting with Method InvokeClient(...
and look for transport within the next 50 lines to see how that works up to here

#; Make the request
Set sc=transport.DoSOAPRequest($this,Action,OneWay,stream,.responseStream)


Just to be clear:
I personally won't do it that way because of all the related maintenance risks.

In order to use a table in an external DB you need to LINK this table to your Caché instance.
There's a Wizard in Mgmt Portal  System > SQL > Wizards > Link Table

It connects to your external table using  SQLgateway and creates a proxy class in your namespace
that presents the table with all SQLnames ...( underscores, ...) as if it was a local table but with a special external storage

Then you use this proxy class as you would do with a local one.
Table 'WINSURGE_RESULT_FACT' should then be visible and accessible. 

It might be somewhat slower than Globals  wink

Evgeny,
The type of mirror depends on how it should be used:

  • for Disaster Recovery, it is important to get as much real-time date across as possible.
    it is irrelevant to have indices, cubes or similar in your (very) remote data center. 
    so I'd recommend asynchronous Mirror / Shadow to feed it.
    What else you require can be generated from existing data. 
     
  • for High Availability, everything to continue / restart  should be available permanently
    so my recommendation is Synchronous Mirror
     
  • but in parallel, there is the recommendation to separate Production data from DeepSee cubes
    less for cube maintenance but fo queries. And that's really important!
     
  • As a consequence, you would need a secondary mirror to provide high availability + performance also
    for your DeepSee cubes. Which is not a waste of effort as it allows load balancing across DeepSee. 
     
  • In any case, it is a tricky exercise to build, verify and manage such a configuration.