and by the way, is Set Request.Https=1 correct given that Set Request.Https=$$$YES not supported in Ensemble 2014?

Yes, it's the same thing $$$YES macro resolves into 1.

but I get this error :  
{"Errors":["The request entity's media type 'text/html' is not supported for this resource."],"StatusCode":415}

Specify content type. For example:

Set Request.ContentType = "application/json"

or whatever content type the api requires.

Not really. KeyFieldName only affects the tracking of processed records.  Example 5 shows configuration where each row is passed each time the service querying the database is ran.

SQL Inbound Adapter always passes rows one by one.

Your options are:

  1. Create a buffer and check if this is a last row. If it's a last row - call bulk API. If it's not a last row then add row to buffer.
  2. Call bulk API after every N (i.e. 100) of rows.
  3. Extend SQL  Inbound Adapter to pass a whole resultset or to pass batches of rows.
  4. Write changes locally row by row. Create a separate service that calls bulk API from local data.

What option to choose? Here are several questions, which may help you:

  1. What are the throughout rates (per second/minute/day/peaks?)?
    • New rows in the source system
    • How much rows Ensemble can process
    • How much requests can API process (does it matter if you pass several rows? For example you can pass 100 individual requests per second or 10 bulk requests with 1000 rows each)
  2. Administrative limits for the above-mentioned external systems?
  3. Can you normalize some of these rates? (For example you receive updates during the work hours, but send the 24/7) 
  4. What's the bulk error strategy (good to bad)?
    • You get an error list which you can easily match to individual records
    • You get an error list but you're unable to match it to the individual records
    • You get one (first/last/random) error
  5. Should you group your records before sending (can be useful for visual tracing, pinpointing error source)?
    • By some criteria (hospital, country, day, etc)
  6. What's the resend strategy in cause of errors?
    • Let's say you sent a batch of 1000 records: 999 ok, 1 failed. Can you easily resend only one record? Would sending a whole batch again break data consistency or just fail altogether? 
  7. Can you send the records individually?

so is there a way to get it working with SSLConfig

As I said:

Where  SSLConfiguration is the name of your ssl config.

You need to create a SSL config. Docs explain how.

 test 0 or 1 means as the doc doesn't mention it!?

Test values

  • 0 - send as usual
  • 1 - do not send, output request to the current device
  • 2- send the request and output response to the current device

location in Post method is optional given that we set Set Request.Location = "/STP_IF/rest/Employee/Create"

Yes, it's enough to specify Location property.

Google implies that your request is not complete.

Generally, when debugging web services you should follow these steps:

  1. Have a way to send valid requests (i.e. SoapUI)
  2. Send request via Caché/Ensemble
  3. Compare (DiffDog, etc) requests from 1 and 2, here you need to:
    • Modify valid request till it fails
    • Modify invalid request  till it succeeds

Also, don't forget to send new request after each modification. Web services often have GUID/ID by which they identify incoming requests. If incoming request has the same identifier they don't execute it again, but just return cached result. Identifier can be a header or inside message body.

SET JArray=["somthing "] 

OR

Set Array1 = ##class(%Library.DynamicArray).%New()
 SET Array1=[]

so in both cases Array1 or JArray is not understanding [] so should be including or extending a classe(s) or ...etc 

That's available from version 2016.2. Refer to your local documentation or online documentation for 2014 version.

FYI Srever name & port are not required for this Wed Service. 

It's not server name - it's host and it's required. You also need to specify HTTPS and SSLConfig.

If I execute your code in test mode (  Set Status = Request.Post(,1) ) I receive:

POST /https%3A//devtest.altus.net.au/STP_IF/rest/Employee/ HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Cache;)
Host: localhost
Accept-Encoding: gzip
Content-Length: 239
Content-Type: text/html; charset=UTF-8
 
{
        "Id":123,
        "PayerAustralianBusinessNumbe":"PayerAustralianBusinessNumbe",
        "PayerBusinessHoursPhoneNumbe":"PayerBusinessHoursPhoneNumbe",
        "PayerEmailAddress":"email",
        "PayerWithholdingPayerNumber":"PayerWithholdingPayerNumber"
}

You should probably modify your code like this this:

ClassMethod Test(test As %String(VALUELIST="0,1,2") = 1)
{
 Set Body = ##class(%ZEN.proxyObject).%New()
 Set Body.Id = "123"
 Set Body.PayerEmailAddress = "email"
 Set Body.PayerBusinessHoursPhoneNumbe = "PayerBusinessHoursPhoneNumbe"
 Set Body.PayerAustralianBusinessNumbe = "PayerAustralianBusinessNumbe"
 Set Body.PayerWithholdingPayerNumber = "PayerWithholdingPayerNumber"

 Set Request= ##class(%Net.HttpRequest).%New()
 Set Request.Server = "devtest.altus.net.au"
 
 Set Request.Location = "STP_IF/rest/Employee/"
 Set Request.Https = $$$YES
 Set Request.SSLConfiguration = "YourSSLConfig"
 Set Status = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(Request.EntityBody, Body)
 Set Status = Request.Post(,test)
}

Where  SSLConfiguration is the name of your ssl config. Afterwards with test=1 I get this:

POST /STP_IF/rest/Employee/ HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Cache;)
Host: devtest.altus.net.au
Accept-Encoding: gzip
Content-Length: 239
Content-Type: text/html; charset=UTF-8
 
{
        "Id":123,
        "PayerAustralianBusinessNumbe":"PayerAustralianBusinessNumbe",
        "PayerBusinessHoursPhoneNumbe":"PayerBusinessHoursPhoneNumbe",
        "PayerEmailAddress":"email",
        "PayerWithholdingPayerNumber":"PayerWithholdingPayerNumber"
}

And the response with test=2 is as follows:

HTTP/1.1 405 Method Not Allowed
ALLOW: GET
CACHE-CONTROL: no-cache
CONNECTION: keep-alive
CONTENT-LENGTH: 73
CONTENT-TYPE: application/json; charset=utf-8
DATE: Fri, 05 Jan 2018 08:16:20 GMT
EXPIRES: -1
PRAGMA: no-cache
SERVER: Microsoft-IIS/8.5
 
{"Message":"The requested resource does not support http method 'POST'."}

You should check the API docs for correct location (or HTTP verb)

I'm basically looking to handcraft the Body.%ToJSON() content to to be contained in []

Wrap Body in %ListOfObjects for that:

Set List = ##class(%ListOfObjects).%New()
Do List.Insert(Body)
Set Status = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(Request.EntityBody, List)

And your request body would look like this:

[ {
                "Id":123,
                "PayerAustralianBusinessNumbe":"PayerAustralianBusinessNumbe",
                "PayerBusinessHoursPhoneNumbe":"PayerBusinessHoursPhoneNumbe",
                "PayerEmailAddress":"email",
                "PayerWithholdingPayerNumber":"PayerWithholdingPayerNumber"
        }
]

Export it as XML. Store in VCS with code. Import with the rest of the code.

Other option is to store it as XData, here's sample code:

XData DisplayProperies
{
<Export generator="Cache">
<Global>
<Node><Sub>^Test</Sub>
<Node><Sub>1</Sub>
<Data>123</Data>
</Node>
<Node><Sub>Val2</Sub>
<Data>prop3</Data>
</Node>
<Node><Sub></Sub>
<Data>prop1</Data>
</Node>
</Node>
</Global>
</Export>
}

/// Set global
/// do ##class(Class.Installer).setGlobal()
ClassMethod setGlobal() As %Status
{
    #dim sc As %Status = $$$OK
    #dim className As %String = $classname()
    
    // search for XData: DisplayProperies
    #dim xdata As %Dictionary.CompiledXData = ##class(%Dictionary.CompiledXData).IDKEYOpen(className, "DisplayProperies",, .sc)
    quit:$$$ISERR(sc) sc

    set stream = xdata.Data
    set sc = $system.OBJ.LoadStream(stream, "/displaylog=0 /displayerror=0")
    quit sc
}

sbJSON that actually get passed to XmlToJSONNode is not an object. Additionally try this modification to XmlToJSON (you need to specify file if you want to use file stream):

Method XmlToJSON(xml As %Stream) As %Stream
{
            set xmlDoc =##class(%XML.TextReader).ParseStream(xml,.textreader)          
            set sbJSON =##class(%Stream.FileCharacter).%New()
            do sbJSON.LinkToFile("somefile")
            do sbJSON.WriteLine($C(123))
            do ..XmlToJSONnode(sbJSON,textreader.Name,1)
            do sbJSON.writeLine($C(125))
            return sbJSON
}

 can't find properties Prop1, Prop2...etc in %ZEN.proxyObject documentation

They are dynamic (defined via %DispatchGetProperty/%DispatchSetProperty) so you can assign any properties to %ZEN.proxyObject.

 CopyFrom in %Net.HttpRequest, you can find Write method but not the Copyfrom method so how do we suppose to know those properties and methods?

Unable to reproduce (on 2017.2 though).

You may try to use #Dim directive:

#Dim Stream As %GlobalBinaryStream
Set Stream = ##class(%GlobalBinaryStream).%New()
Do Stream.Write("111")
Set Request.EntityBody = Stream

Autocomplete works better for variables defined with #Dim (also it's useful for lists/arrays with objects).

what the Maximum Props we can have ?

1000 properties per class.