Question
· 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 

   <soapenv:Body>
      <ns:Ping/>
   </soapenv:Body>
 

Discussion (4)0
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 ELEMENTQUALIFIED = 1;

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)

OK.
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.