For scalar types, SOAP adopts all the built-in simple types specified by the XML Schema specification. This includes strings, floats, doubles, and integers.
Simple Types Built-In to XML Schema |
Simple Type | Example(s) |
string | Confirm this is electric |
boolean | true, false, 1, 0 |
float | -INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN |
double | -INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN |
decimal | -1.23, 0, 123.4, 1000.00 |
binary | 100010 |
integer | -126789, -1, 0, 1, 126789 |
nonPositiveInteger | -126789, -1, 0 |
negativeInteger | -126789, -1 |
long | -1, 12678967543233 |
int | -1, 126789675 |
short | -1, 12678 |
byte | -1, 126 |
nonNegativeInteger | 0, 1, 126789 |
unsignedLong | 0, 12678967543233 |
unsignedInt | 0, 1267896754 |
unsignedShort | 0, 12678 |
unsignedByte | 0, 126 |
positiveInteger | 1, 126789 |
date | 1999-05-31, ---05 |
time | 13:20:00.000, 13:20:00.000-05:00 |
For example, here is a SOAP response with a double data type:
<?xml version='1.0' encoding='UTF-8'?*gt;
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getPriceResponse
xmlns:ns1="urn:examples:priceservice"
SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<return xsi:type="xsd:double">54.99</return>
</ns1:getPriceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
|
No comments:
Post a Comment