[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Call to HTTP_URL_P ended in error
Scott,
The parser did crash. I have attached the XML file and the StartofElement and EndofElement routines from my program in the CodeSample.txt file
Naresh
Naresh Mistry | TM Architect | Nulogx Inc. | 5090 Explorer Dr, Suite 203, Mississauga, ON L4W 4T9 | T: 905-486-1162 x 238 | F: 905-267-3164 | C: 416-820-5231
www.nulogx.com | Transportation Management Solutions | www.cgfi.ca | Canadian General Freight Index – Register Today
-----Original Message-----
From: Scott Klement [mailto:sk@xxxxxxxxxxxxxxxx]
Sent: Monday, May 14, 2012 10:06 AM
To: Naresh Mistry
Cc: HTTPAPI and FTPAPI Projects
Subject: Re: Call to HTTP_URL_P ended in error
Hi Naresh,
rc=1 means success.
The http_url_post() routine does not parse the data you receive back from the server, it simply saves it to a file. So nothing "replaces"
the StartOfElement/EndOfElement -- the XML parser hasn't been run, so there's nothing similar to those.
What we have determined, therefore, is that the error isn't occurring during the HTTP communications. It's occuring during the XML parsing.
Now your XML file is in a stream file (maybe called /tmp/httpapi_test.txt -- or whatever you decided to call it.)
Let's try parsing that XML without doing the HTTP transfer:
rc = http_parse_xml_stmf( '/tmp/httpapi_test.xml'
: HTTP_XML_CALC
: %paddr(StartOfElement)
: %paddr(EndOfElement)
: *null );
So this takes the file you've already downloaded and parses it directly from the IFS without the network communications happening. Since we now suppose the error is occurring during XML processing, I can only assume that this will end in error (call to HTTP_PARSE ended in error).
Please try that, and see if it's true. If I'm right and it crashes,
please send me the XML file and the two routines
(StartOfElement/EndOfElement) so I can try to reproduce the problem on my box.
-SK
On 5/14/2012 7:30 AM, Naresh Mistry wrote:
>
> Scott, I made the change, nothing crashed and rc returned a 1. Now
> that StartofElement and EndofElement procedures are not part of the
> parameter list, what replaces these procedures ?
>
> Naresh >
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:LTLRateShipmentResponse xmlns:ns1="http://webservices.smc.com"><ns1:LTLRateShipmentResponse><LHGrossCharge xmlns="http://web.ltl.smc.com">0</LHGrossCharge><LTL_Surcharge xmlns="http://web.ltl.smc.com"></LTL_Surcharge><RBNO xmlns="http://web.ltl.smc.com"></RBNO><TL_Surcharge xmlns="http://web.ltl.smc.com"></TL_Surcharge><absoluteMCFloor xmlns="http://web.ltl.smc.com">0</absoluteMCFloor><actualWgt xmlns="http://web.ltl.smc.com">0</actualWgt><billedWgt xmlns="http://web.ltl.smc.com">0</billedWgt><deficitCharge xmlns="http://web.ltl.smc.com">0</deficitCharge><deficitRate xmlns="http://web.ltl.smc.com">0</deficitRate><deficitWeight xmlns="http://web.ltl.smc.com">0</deficitWeight><destinationCity xmlns="http://web.ltl.smc.com"></destinationCity><destinationCountry xmlns="http://web.ltl.smc.com">US</destinationCountry><destinationPostalCode xmlns="http://web.ltl.smc.com">40111</destinationPostalCode><destinationState xmlns="http://web.ltl.smc.com"></destinationState><details xmlns="http://web.ltl.smc.com"><LTLResponseDetail><charge></charge><error>0</error><nmfcClass>65</nmfcClass><rate></rate><weight>498.0000</weight></LTLResponseDetail></details><discountAmount xmlns="http://web.ltl.smc.com">0</discountAmount><discountApplication xmlns="http://web.ltl.smc.com">C</discountApplication><discountPctUsed xmlns="http://web.ltl.smc.com">0</discountPctUsed><effectiveDate xmlns="http://web.ltl.smc.com"></effectiveDate><errorCode xmlns="http://web.ltl.smc.com">28</errorCode><mcDiscount xmlns="http://web.ltl.smc.com">60</mcDiscount><minimumCharge xmlns="http://web.ltl.smc.com">0</minimumCharge><orgDestToGateWayPointFlag xmlns="http://web.ltl.smc.com"></orgDestToGateWayPointFlag><originCity xmlns="http://web.ltl.smc.com"></originCity><originCountry xmlns="http://web.ltl.smc.com">US</originCountry><originPostalCode xmlns="http://web.ltl.smc.com">30344</originPostalCode><originState xmlns="http://web.ltl.smc.com"></originState><rateAdjustmentFactor xmlns="http://web.ltl.smc.com">1.0</rateAdjustmentFactor><rateApplication xmlns="http://web.ltl.smc.com"></rateApplication><shipmentDateCCYYMMDD xmlns="http://web.ltl.smc.com">20110110</shipmentDateCCYYMMDD><shipmentID xmlns="http://web.ltl.smc.com"></shipmentID><stopAlternationWeight xmlns="http://web.ltl.smc.com"></stopAlternationWeight><suffix xmlns="http://web.ltl.smc.com"></suffix><surchargeAmount xmlns="http://web.ltl.smc.com">0</surchargeAmount><surchargeApplication xmlns="http://web.ltl.smc.com">N</surchargeApplication><surchargePercentUsed xmlns="http://web.ltl.smc.com">0</surchargePercentUsed><tariffName xmlns="http://web.ltl.smc.com">DEMOLTLA</tariffName><tblno xmlns="http://web.ltl.smc.com"></tblno><totalCharge xmlns="http://web.ltl.smc.com">0</totalCharge><useDiscounts xmlns="http://web.ltl.smc.com">Y</useDiscounts><useSingleShipmentCharges xmlns="http://web.ltl.smc.com">N</useSingleShipmentCharges><userMinimumChargeFloor xmlns="http://web.ltl.smc.com"></userMinimumChargeFloor><weightBreak_Discount_1 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_1><weightBreak_Discount_10 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_10><weightBreak_Discount_11 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_11><weightBreak_Discount_2 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_2><weightBreak_Discount_3 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_3><weightBreak_Discount_4 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_4><weightBreak_Discount_5 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_5><weightBreak_Discount_6 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_6><weightBreak_Discount_7 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_7><weightBreak_Discount_8 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_8><weightBreak_Discount_9 xmlns="http://web.ltl.smc.com"></weightBreak_Discount_9></ns1:LTLRateShipmentResponse></ns1:LTLRateShipmentResponse></soap:Body></soap:Envelope>
ÿþ 1 0 1 0 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
1 0 2 0 0 * P r o t o t y p e d e f i n i t o n f o r S t a r t O f E l e m e n t P r o c e d u r e 0 4 / 0 7 / 1 1
1 0 3 0 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
1 0 4 0 0 D S t a r t O f E l e m e n t P R 0 9 / 2 3 / 0 6
1 0 5 0 0 D U s e r D a t a * v a l u e 0 9 / 2 3 / 0 6
1 0 6 0 0 D d e p t h 1 0 I 0 v a l u e 0 9 / 2 3 / 0 6
1 0 7 0 0 D n a m e 1 0 2 4 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
1 0 8 0 0 D p a t h 2 4 5 7 6 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
1 0 9 0 0 D a t t r s * d i m ( 3 2 7 6 7 ) 0 9 / 2 3 / 0 6
1 1 0 0 0 D c o n s t o p t i o n s ( * v a r s i z e ) 0 9 / 2 3 / 0 6
1 1 1 0 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
1 1 2 0 0 * P r o t o t y p e d e f i n i t o n f o r E n d O f E l e m e n t P r o c e d u r e 0 4 / 0 7 / 1 1
1 1 3 0 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
1 1 4 0 0 D E n d O f E l e m e n t P R 0 9 / 2 3 / 0 6
1 1 5 0 0 D U s e r D a t a * v a l u e 0 9 / 2 3 / 0 6
1 1 6 0 0 D d e p t h 1 0 I 0 v a l u e 0 9 / 2 3 / 0 6
1 1 7 0 0 D n a m e 1 0 2 4 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
1 1 8 0 0 D p a t h 2 4 5 7 6 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
1 1 9 0 0 D v a l u e 6 5 5 3 5 A v a r y i n g c o n s t 0 9 / 1 2 / 0 7
1 2 0 0 0 D a t t r s * d i m ( 3 2 7 6 7 ) 0 9 / 2 3 / 0 6
1 2 1 0 0 D c o n s t o p t i o n s ( * v a r s i z e ) 0 9 / 2 3 / 0 6
1 2 2 0 0 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
1 5 3 0 0 D p a t h 1 s 5 0 0 A 0 5 / 0 1 / 1 2
1 5 4 0 0 D p a t h 2 s 5 0 0 A 0 5 / 0 1 / 1 2
1 5 5 0 0 D p a t h 3 s 5 0 0 A 0 5 / 0 2 / 1 2
2 0 3 0 0 0 5 / 0 4 / 1 2
2 0 4 0 0 / / S e t P a t h s 0 5 / 0 4 / 1 2
2 0 5 0 0 p a t h 1 = ' / s o a p : E n v e l o p e / s o a p : B o d y / ' + 0 5 / 0 1 / 1 2
2 0 6 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e / ' + 0 5 / 0 1 / 1 2
2 0 7 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e ' ; 0 5 / 0 2 / 1 2
2 0 8 0 0 0 5 / 0 1 / 1 2
2 0 9 0 0 p a t h 2 = ' / s o a p : E n v e l o p e / s o a p : B o d y / ' + 0 5 / 0 2 / 1 2
2 1 0 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e / ' + 0 5 / 0 2 / 1 2
2 1 1 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e / ' + 0 5 / 0 2 / 1 2
2 1 2 0 0 ' d e t a i l s ' ; 0 5 / 0 2 / 1 2
2 1 3 0 0 0 5 / 0 2 / 1 2
2 1 4 0 0 p a t h 3 = ' / s o a p : E n v e l o p e / s o a p : B o d y / ' + 0 5 / 0 2 / 1 2
2 1 5 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e / ' + 0 5 / 0 1 / 1 2
2 1 6 0 0 ' n s 1 : L T L R a t e S h i p m e n t R e s p o n s e / ' + 0 5 / 0 1 / 1 2
2 1 7 0 0 ' d e t a i l s / L T L R e s p o n s e D e t a i l ' ; 0 5 / 0 2 / 1 2
2 1 8 0 0 0 5 / 0 4 / 1 2
0 2 / 2 5 / 1 1
4 2 8 0 0 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / 0 4 / 0 7 / 1 1
4 2 9 0 0 / / P r o c e d u r e s - S t a r t o f E l e m e n t / / 0 4 / 0 7 / 1 1
4 3 0 0 0 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / 0 4 / 0 7 / 1 1
4 3 1 0 0 0 9 / 2 3 / 0 6
4 3 2 0 0 P S t a r t O f E l e m e n t B 0 9 / 2 3 / 0 6
4 3 3 0 0 D S t a r t O f E l e m e n t P I 0 9 / 2 3 / 0 6
4 3 4 0 0 D U s e r D a t a * v a l u e 0 9 / 2 3 / 0 6
4 3 5 0 0 D d e p t h 1 0 I 0 v a l u e 0 9 / 2 3 / 0 6
4 3 6 0 0 D n a m e 1 0 2 4 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
4 3 7 0 0 D p a t h 2 4 5 7 6 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
4 3 8 0 0 D a t t r s * d i m ( 3 2 7 6 7 ) 0 9 / 2 3 / 0 6
4 3 9 0 0 D c o n s t o p t i o n s ( * v a r s i z e ) 0 9 / 2 3 / 0 6
4 4 0 0 0 / f r e e 0 9 / 2 3 / 0 6
4 4 1 0 0 0 9 / 2 3 / 0 6
4 4 2 0 0 / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * 0 4 / 0 7 / 1 1
4 4 3 0 0 / / P a t h f o r F r e i g h t C l a s s e s 0 5 / 0 1 / 1 2
4 4 4 0 0 / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * 0 4 / 0 7 / 1 1
4 4 5 0 0 0 4 / 0 7 / 1 1
4 4 6 0 0 S e l e c t ; 0 4 / 0 7 / 1 1
4 4 7 0 0 W h e n p a t h = p a t h 2 a n d n a m e = ' L T L R e s p o n s e D e t a i l ' ; 0 5 / 0 1 / 1 2
4 4 8 0 0 / / @ C o u n t = @ C o u n t + 1 ; 0 5 / 0 4 / 1 2
4 4 9 0 0 E n d S l ; 0 4 / 0 7 / 1 1
4 5 0 0 0 0 3 / 2 6 / 1 2
4 5 1 0 0 / e n d - f r e e 0 9 / 2 3 / 0 6
4 5 2 0 0 P E 0 9 / 2 3 / 0 6
4 5 3 0 0 0 9 / 2 3 / 0 6
4 5 4 0 0 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / 0 4 / 0 7 / 1 1
4 5 5 0 0 / / P r o c e d u r e s - E n d o f E l e m e n t / / 0 4 / 0 7 / 1 1
4 5 6 0 0 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / / 0 4 / 0 7 / 1 1
4 5 7 0 0 0 9 / 2 3 / 0 6
4 5 8 0 0 P E n d O f E l e m e n t B 0 9 / 2 3 / 0 6
4 5 9 0 0 D E n d O f E l e m e n t P I 0 9 / 2 3 / 0 6
4 6 0 0 0 D U s e r D a t a * v a l u e 0 9 / 2 3 / 0 6
4 6 1 0 0 D d e p t h 1 0 I 0 v a l u e 0 9 / 2 3 / 0 6
4 6 2 0 0 D n a m e 1 0 2 4 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
4 6 3 0 0 D p a t h 2 4 5 7 6 A v a r y i n g c o n s t 0 9 / 2 3 / 0 6
4 6 4 0 0 D v a l u e 6 5 5 3 5 A v a r y i n g c o n s t 0 9 / 1 2 / 0 7
4 6 5 0 0 D a t t r s * d i m ( 3 2 7 6 7 ) 0 9 / 2 3 / 0 6
4 6 6 0 0 D c o n s t o p t i o n s ( * v a r s i z e ) 0 9 / 2 3 / 0 6
4 6 7 0 0 / f r e e 0 9 / 2 3 / 0 6
4 6 8 0 0 0 2 / 2 5 / 1 1
4 6 9 0 0 0 4 / 0 7 / 1 1
4 7 0 0 0 / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * 0 4 / 0 7 / 1 1
4 7 1 0 0 / / P a t h f o r S U C C E S S ! ! ! 0 4 / 0 7 / 1 1
4 7 2 0 0 / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * 0 4 / 0 7 / 1 1
4 7 3 0 0 0 4 / 0 7 / 1 1
4 7 4 0 0 / / E r r o r C h e c k i n g 0 5 / 0 1 / 1 2
4 7 5 0 0 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 4 / 0 7 / 1 1
4 7 6 0 0 0 4 / 0 7 / 1 1
4 7 7 0 0 s e l e c t ; 0 5 / 0 1 / 1 2
4 7 9 0 0 w h e n p a t h = p a t h 1 ; 0 5 / 0 1 / 1 2
4 8 0 0 0 / / D e f i c i t D e t a i l s 0 5 / 0 1 / 1 2
4 8 1 0 0 s e l e c t ; 0 5 / 0 1 / 1 2
4 8 2 0 0 w h e n n a m e = ' d e f i c i t C h a r g e ' ; 0 5 / 0 1 / 1 2
4 8 3 0 0 / / r x d c h g = % d e c ( % t r i m ( v a l u e ) : 1 1 : 2 ) ; 0 5 / 0 1 / 1 2
4 8 4 0 0 w h e n n a m e = ' d e f i c i t R a t e ' ; 0 5 / 0 1 / 1 2
4 8 5 0 0 / / r x d r t e = % d e c ( % t r i m ( v a l u e ) : 7 : 2 ) ; 0 5 / 0 1 / 1 2
4 8 6 0 0 w h e n n a m e = ' d e f i c i t W e i g h t ' ; 0 5 / 0 2 / 1 2
4 8 7 0 0 / / r x d w g t = % d e c ( % t r i m ( v a l u e ) : 1 1 : 4 ) ; 0 5 / 0 2 / 1 2
4 8 8 0 0 w h e n n a m e = ' R B N O ' ; 0 5 / 0 3 / 1 2
4 8 9 0 0 / / p 0 R a t = % s u b s t ( v a l u e : 3 : 6 ) ; 0 5 / 0 3 / 1 2
4 9 0 0 0 e n d s l ; 0 5 / 0 1 / 1 2
4 9 1 0 0 0 5 / 0 1 / 1 2
4 9 2 0 0 / / F r e i g h t C l a s s e s 0 5 / 0 1 / 1 2
4 9 3 0 0 w h e n p a t h = p a t h 3 ; 0 5 / 0 2 / 1 2
4 9 4 0 0 s e l e c t ; 0 5 / 0 1 / 1 2
4 9 5 0 0 w h e n n a m e = ' c h a r g e ' ; 0 5 / 0 1 / 1 2
4 9 6 0 0 / / f r t C l a s s e s . p A m o u n t ( @ C o u n t ) = % d e c ( % t r i m ( v a l u e ) : 1 1 : 2 ) ; 0 5 / 0 4 / 1 2
4 9 7 0 0 w h e n n a m e = ' r a t e ' ; 0 5 / 0 1 / 1 2
4 9 8 0 0 / / f r t C l a s s e s . p R a t e ( @ C o u n t ) = % d e c ( % t r i m ( v a l u e ) : 7 : 2 ) ; 0 5 / 0 4 / 1 2
4 9 9 0 0 e n d s l ; 0 5 / 0 1 / 1 2
5 0 0 0 0 0 5 / 0 1 / 1 2
5 0 1 0 0 e n d S l ; 0 5 / 0 1 / 1 2
5 0 2 0 0 0 4 / 0 7 / 1 1
5 0 3 0 0 / e n d - f r e e 0 9 / 2 3 / 0 6
5 0 4 0 0 P E 0 9 / 2 3 / 0 6
* * * * E N D O F S O U R C E * * * *
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------