How to use WriteSOAPBodyMethod method?

Primary tabs

SOAP, Caché

Would anyone please have an example of how to use the WriteSOAPBodyMethod method?

 

The webservice method I'm trying to overwrite the body looks like this:

Method RecepcionarLoteRps(EnviarLoteRpsEnvio As %String(CONTENT="MIXED")) As %String(CONTENT="MIXED",XMLNAME="EnviarLoteRpsResposta") [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
 Set ..WriteSOAPBodyMethod = "override"
 Quit ..WebMethod("RecepcionarLoteRps").Invoke($this,"",.EnviarLoteRpsEnvio)
 Set ..WriteSOAPBodyMethod=""
}

Method override(proxy As %SOAP.ProxyDescriptor, tag As %String) As %String
{
Quit ""
}
Thanks!!

 

 

  • 0
  • 0
  • 63
  • 1
  • 1

Answers

You need to return Status from this method.

Everything that you write inside this method is placed inside element

Method override(
    proxy As %SOAP.ProxyDescriptor,
    tag As %String) As %Status
{
   Write "<request>hi</request>",!
   Quit 1
}