EldoS | Feel safer!

Software components for data protection, secure storage and transfer

values as attributes in SOAP

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#37210
Posted: 07/08/2016 07:28:38
by Roman Rumisek (Basic support level)
Joined: 07/08/2016
Posts: 6

How do I define a descendant of TElXMLSOAPCompoundParameter when data is expressed using attributes?

e.g.:

<eet:Data dic_popl="CZ72080043" dic_poverujiciho="CZ00006947"
.......
  />

or

<eet:Response>
<eet:Header uuid_zpravy="123e4567-e89b-42d3-a456-426655440000"
dat_prij="2017-03-04T18:25:21+01:00"
bkp="01234567-89abcdef-01234567-89abcdef-01234567"
/>
<eet:Confirmed fik="987a6be5-6af5-44f3-b4fc-987654321000-02" />
</eet:Response>

thank you for answer

Rumisek
#37211
Posted: 07/08/2016 08:05:30
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us,

Quote

How do I define a descendant of TElXMLSOAPCompoundParameter when data is expressed using attributes?

The parameters doesn't support attributes at the moment, so you would need to add them after message generation. For example:
Code
k = SOAPClient.AddCompoundParameter("ComplexParam1", "http://...");
CompoundParameter = TElXMLSOAPCompoundParameter(SOAPClient.get_Parameters(k));
...
SOAPClient.GenerateMessage();
..
CompoundParameter.XMLElement.SetAttributeNS("http://...", "name", "value");


If you're going to create a descendant of TElXMLSOAPCompoundParameter as described here https://www.eldos.com/documentation/sb...param.html , then to add attributes you would need to override SaveToXML() method, for example:
Code
function YourClass.SaveToXML(Document: TElXMLDOMDocument; Formatter: TElXMLCustomFormatter): TElXMLDOMElement;
begin
  Result := inherited SaveToXML(Document, Formatter);
  Result.SetAttributeNS('http://...', 'name', 'value');
end;
#37212
Posted: 07/08/2016 08:29:35
by Roman Rumisek (Basic support level)
Joined: 07/08/2016
Posts: 6

Thank you for your prompt response.

Still, I have one question:

the object for string parameter is TElXMLSOAPStringParameter.

What are object names for integer and double ?

Thanks

Rumisek
#37213
Posted: 07/08/2016 08:32:30
by Dmytro Bogatskyy (EldoS Corp.)

Hi,

Quote
What are object names for integer and double ?

TElXMLSOAPIntegerParameter, TElXMLSOAPInt64Parameter and TElXMLSOAPDoubleParameter classes
#37215
Posted: 07/08/2016 09:09:42
by Roman Rumisek (Basic support level)
Joined: 07/08/2016
Posts: 6

Hi,

probably last question:

Enumerable parameters are supported ?

For. ex.:

type
XType = (Simple, Composite);

Xclass = class(TElXMLSOAPCustomParameter)
private
FType: XType; // or ???

public
property PType: XType read GetXType write SetXType
end;

Rumisek
#37217
Posted: 07/08/2016 12:27:28
by Dmytro Bogatskyy (EldoS Corp.)

Hi,

Quote
Enumerable parameters are supported ?

No, there is no such class.
But you can create a descendant of TElXMLSOAPBaseParameter class and set StringValue property based on enum value. Or simply use TElXMLSOAPStringParameter class.
#37230
Posted: 07/11/2016 06:57:28
by Roman Rumisek (Basic support level)
Joined: 07/08/2016
Posts: 6

Thanks for all your answers.

Roman
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 692 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!