Question
· Jul 13, 2016

Overriding soap body

We can override soap body by using WriteSOAPBodyMethod. Something like:

Method Online(ByRef Obj1 As myClass1, Obj2 As myClass2, Output ObjOutput1 As myClass1Output(XMLNAME="Obj")) [ ..., WebMethod ]

{

              …

              s ..WriteSOAPBodyMethod="override"

              d (..WebMethod("Online","ProcessRequest")).Invoke($this,"Online",.Obj1,.Obj2,. ObjOutput1)

              s ..WriteSOAPBodyMethod=""

              …

}

Method override(proxy As %SOAP.ProxyDescriptor, tag As %String)

{

              …

}

In order to generate soap body, how can one  access  Obj1 and Obj2 from within the override method?

Discussion (1)1
Log in or sign up to continue

Parameters being passed to a SOAP operation are also defined as properties in the generated class. In your override method, the "proxy" parameter will have a property matching the name of Obj1 and Obj2 parameters. Given your example the following should work

Method override(proxy As %SOAP.ProxyDescriptor, tag As %String)

{

             ....

            W proxy.Obj1,!

             W proxy.Obj2,!

            ........

}