Your error looks like it's cause because there's no HeaderOut property defined in current class.

Anyway, you need to create a custom class which would be your header:

Class custom.Header Extends %SOAP.Header
{

Parameter XMLFORMAT = "literal";

Parameter XMLIGNORENULL = "RUNTIME";

Parameter NAMESPACE = "urn:epic-com.2013.Interconnect.Headers";

/// The XMLPREFIX parameter controls the prefix to be used for the XML namespace that
/// is given by the NAMESPACE parameter.
///Parameter XMLPREFIX As STRING = "";

Parameter XMLTYPE = "Epic-Client-ID";

Property Value As %String(XMLPROJECTION = "CONTENT", MAXLEN = 36) [ InitialExpression = "12349fe5-2ff8-4b79-b723-e69efbabcdef" ];

}

After that you need to create an instance of this class and add it to HeaderOut property of your WS client.

Okay, how do I make this work with methods?

On property get/set I need to call instance method.

I've tried this:

Class Test.String Extends %String
{

Method Get() As %String [ CodeMode = objectgenerator ]
{
    do %code.WriteLine($c(9) _ "Quit ..Test()")
    quit $$$OK
}

}

And class:

/// set obj = ##class(Test.Obj).%New()
/// w obj.prop
Class Test.Obj Extends %RegisteredObject
{

Property prop As Test.String;

Method Test()
{
    quit $random(100)
}

}

But it fails to compile.