We have an AS/400 program directly calling socket APIs to call a remote
web service.

The program connects to port 80, sends stuff like POST and SOAPAction and
a boatload of XML,

We are stuck on the proper way to format and send a decimal literal in XML
and receive it back in XML.

Schema defines the element this way:

<xs:element name="Charges" type="xs:decimal" minOccurs="0" />

And we pass the data like:

<Charges>12.00</Charges>

In other words, we send twelve dollars (plus some string elements that are
working okay), then receive back twelve dollars (plus some string elements
that are working okay).

But when our XML includes the <Charges>12.00</Charges>, then the remote
web service returns:

HTTP/1.1 500 Internal Server Error

<faultcode>soap:Server
</faultcode>
<faultstring>
Server was unable to process request.
---> Input string was not in a correct format.
Couldn't store <> in Charges Column.
Expected type is decimal.
---> Input string was not in a correct format.
</faulrstring>

Do we need to surround the literal 12.00 with delimiters, or some "cast to
decimal from string" XML thingy ?

- Gene Gaunt

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact [javascript protected email address].