I’m sending a XML using TXMLData and Delphi is adding a tag in the request, my code is like this:
RequestData := TXMLData.Create;
RequestData.LoadFromXML('<MyXML>[contents here]</MyXML>');
MyService.ExecuteRequest(RequestData);
I used the OnBeforeExecute of the THTTPRIO to get the content of the Request and the content is wrapped in a tag, something like this:
<SOAP-ENV:Body>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<MyXML>
</schema>
</SOAP-ENV:Body>
I can’t figure out why this tag is being added. How can I prevent it from being added?
Also, I don’t like the idea of editing the SOAPRequest in the OnBeforeExecute event to remove it without know with it is there.
Solved.
Delphi was mapping the webservice as:
Changing:
to
Solved the issue.
Now delphi is using the “RequestData” as the top node of the XML in the Body of the request, instead of adding a schema tag.
Now the call is generating something like this:
Which is what I need to send.