I have that in there. Thanks though!
I hard coded it just during my original attempts to get it running.
It's running now. Just have an error with the XML (or their server says there's an error).
I was looking in the httpapi_debug.txt file and noticed that the filename line is missing a double quote at the end of the filename. I doubt that is causing my issue...
<?xml version="1.0" encoding="UTF-8"?><error>XML Error: Fatal error: Start tag expected, '<' not found at :1.</error>
<?xml version="1.0" encoding="UTF-8"?>
<service_orders>
<service_order>
<number>1-610615B</number>
<account>2311960</account>
<service_type>Delivery</service_type>
<customer>
<customer_id>2311960</customer_id>
<first_name>HENRY</first_name>
<last_name>MILLER</last_name>
<phone1>301-555-1212</phone1>
<phone2>301-555-1213</phone2>
<address1>SOME STREET</address1>
<city>BOWIE</city>
<state>MD</state>
<zip>20716</zip>
</customer>
<items>
<item>
<sale_sequence>1</sale_sequence>
<item_id>1055746</item_id>
<serial_number>001999188</serial_number>
<description><![CDATA[P992050BD SOFA PAULA DEEN SOLITUDE 09/CW BRO NCO 31/BOL LENA 22/PIL RE]]></description>
<quantity>1</quantity>
<location>Warehouse#1</location>
<cube>3</cube>
<price>1334.95</price>
<countable>1</countable>
</item>
</items>
<cube>1</cube>
<pieces>1</pieces>
<delivery_date>7/09/2014</delivery_date>
</service_order>
</service_orders>
----- Original Message -----
From: "Scott Klement" <rpg400-l@xxxxxxxxxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, July 10, 2013 2:39:02 PM
Subject: Re: http_url_post_xml and REST
Jay,
I know you've gotten past this point already, but... one tip for you
with regard to the following code:
if (rc <> 1);
msg = http_error(err);
dsply msg;
if err<>36;
callp http_crash();
return;
endif;
exsr $getPassword;
endif;
There are named constants in HTTPAPI_H for each error number. So
instead of coding err<>36, you could code err<>HTTP_NDAUTH. This is
just easier to read... HTTP_NDAUTH visually looks like 'Need
Authentication", whereas it's hard to say what '36' means. Even I
didn't know what it was without looking it up...
It's just a small tip, though... what you have will work okay, it's just
not as nice to read.
As an Amazon Associate we earn from qualifying purchases.