How to change TXSDateTime SOAP serialization in Delphi 7?
Posted
by LukLed
on Stack Overflow
See other posts from Stack Overflow
or by LukLed
Published on 2010-05-31T21:48:54Z
Indexed on
2010/05/31
21:53 UTC
Read the original article
Hit count: 1270
I am trying to use Java based webservice and have soap request:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body xmlns:NS1="http://something/">
<NS1:getRequest id="1">
<sessionId xsi:type="xsd:string"></sessionId>
<reportType xsi:type="NS1:reportType">ALL</reportType>
<xsd:dateFrom xsi:type="xsd:dateTime">2010-05-30T23:29:43.088+02:00</xsd:dateFrom>
<xsd:dateTo xsi:type="xsd:dateTime">2010-05-31T23:29:43.728+02:00</xsd:dateTo>
</NS1:getRequest>
<parameters href="#1" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
It doesn't work, because webservice doesn't recognize dates as parameters. When I change
<xsd:dateFrom xsi:type="xsd:dateTime">2010-05-30T23:29:43.088+02:00</xsd:dateFrom>
<xsd:dateTo xsi:type="xsd:dateTime">2010-05-31T23:29:43.728+02:00</xsd:dateTo>
to
<dateFrom xsi:type="xsd:dateTime">2010-05-30T23:29:43.088+02:00</xsd:dateFrom>
<dateTo xsi:type="xsd:dateTime">2010-05-31T23:29:43.728+02:00</xsd:dateTo>
everything works ok, but Delphi (without Delphi source code changes) doesn't allow to change generated XML, it has only some options. Is it possible to set conversion options, so TSXDateTime
is converted to <dateFrom
, not <xsd:dateFrom
tag? Did you meet that problem?
© Stack Overflow or respective owner