Joao Palma · Nov 6, 2019

Missing XML node in SOAP request to Webservice

Hi There

I've created a new WebClient using Studio Addon-s Soap Wizard. 

I've tried to send a soap request using  InvokeMethod.

However the Body comes empty   <soapenv:Body></soapenv:Body>

I needed it to be 



0 0 4 295
Log in or sign up to continue


Thank you Robert. 

I've tried that before and it didn't work though.

This is what I've tried:

pRequest As Conexes.Request.PingRequest

with Property parameters As Conexes.tns.Ping;


Conexes.tns.Ping :


Parameter NAMESPACE = "mynamespace";

Parameter XMLNAME = "Ping";

Parameter XMLSEQUENCE = 1;

Parameter XMLPREFIX = "ns";

Parameter XMLIGNORENULL = 0;

Parameter XMLNIL = 1;


Set tSC = ..Adapter.InvokeMethod("Ping",.pOutput, pRequest.parameters)

It took some investigations to understand what's going on.

the is a Class Parameter XMLUSEEMPTYELEMENT = 1;
it switches between <Ping></Ping>  and <Ping />

BUT: if ALL Properties of your reply are empty then you just get 
an empty body  <soapenv:Body></soapenv:Body>

as soon as you set some dummy value into Property Ping you get  <Ping> </Ping>
or you add a dummy property.

Digging into %SOAP.... message classes shows, that the generated messages don't use XMLUSEEMPTYELEMENT parameter.

Thank you Robert. 

Ended up adding a dummy property to Ping with a default value and XMLPROJECTION = "Attribute" as "None" would error.