[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: HTTPAPI ver 1.13.1




Hi Scott,

Thanks for the info on the debug.  

I have attached a debug log.  The XML itself does work.  A Delphi tool was developed in house by someone else to test the XML against the web service.  So I know the XML string for the document works.  

The POST information was supplied to me by the Web Service.  The only difference is the "Expect: 100-continue" section.  But it fails with or without it.

How does the "encoding attribute' affect things?  Again, the value of "utf-8" was supplied to me by the Web Service vendor.  I have tried the program with both of the following strings and both have received an error"

Content-Type: text/xml; charset=utf-8
Content-Type: text/xml; charset=US-ASCII

Would you be able to steer me in a direction here?  Is there anything that may jump out at you?

Thansk Much,

Dana Anderson

Patterson Companies
St. Paul, MN





Scott Klement <sk@xxxxxxxxxxxxxxxx>
Sent by: owner-ftpapi@xxxxxxxxxxxxx

04/05/2006 05:56 PM

Please respond to
ftpapi@xxxxxxxxxxxxx

To
"'ftpapi@xxxxxxxxxxxxx'" <ftpapi@xxxxxxxxxxxxx>
cc
Subject
Re: Fw: HTTPAPI ver 1.13.1





Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


> I have a question:  I installed it fine and am working through the
> process.  I am getting a -1 back from the Send() function call in the
> CommTCP_BlockWrite procedure.  I can't locate the source for the "Send"
> procedure and was trying to find it in order to debug the process.  Is
> this an object that is even available for viewing?

send() is part of the operating system (OS/400 or i5/OS).

Instead of telling us that send() is returning -1 (which may not even be
an error!) can you please create a debug log and tell us what you find in
it?  (Or, post the log here?)

To do that, insert the following to your program before it calls HTTPAPI:

    http_debug(*ON);


>
> Anything look odd to you below?

Sure, there are a few odd things:

a) You've specified the encoding as "utf-8" but as far as I can tell,
it's not.  Unless you've modified the way HTTPAPI works, it doesn't
convert from EBCDIC to UTF-8, it converts from EBCDIC to ISO-8859-1.

b) Your XML code is missing all of the + (concatenation) characters needed
to create an XML document in an EVAL statement.  So your code wouldn't
even compile.

But none of these would cause a problem with the send() API.  Please post
the debug log, or at the very least, call the http_error() subprocedure to
get an error message.  As it stands, I don't have enough information to
help you.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------

HTTPAPI Ver 1.15 released 2006-03-30

New iconv() objects set, ASCII=819. EBCDIC=0
http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /ivatengineservice/engineservice.asmx HTTP/1.1
Host: nt124a131
Content-Type: text/xml; charset=US-ASCII
SOAPAction: "http://tempuri.org/AnalyseDocument";
Expect: 100-continue
Content-Length: 2875


recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><AnalyseDocument xmlns="http://tempuri.org/";><document><iVATEngineInput><Supplier><ID>    80147</ID><Name>POSTURE PRODUCTS LTD</Name><Address>PO BOX 31 EXMOUTH</Address><Zip>EX8 2YT</Zip><City>DEVON </City><Country>  </Country><VATNumberSupplier Country="  "><VATNumber>              </VATNumber><VATNumberType> 1</VATNumberType><TaxNumber/></VATNumberSupplier></Supplier><Customer><ID>072</ID><Name>HomeCraft</Name><Address>Lowmoore Business Park, Kirkby in Ashfield</Address><City>Nottinghamshire</City><ZIP>NG17 7ET</ZIP><Country>GB</Country><CountryChosenVATNumber/><SupplierUserInfo/><VATNumberCustomer Country="GB"><VATNumber>GB 870418425</VATNumber><VATNumberType>1</VATNumberType><Name>HomeCraft</Name><Address1>Nunn Brook Road, Huthwaite</Address1><Address2>Sutton-in-Ashfield</Address2><Address3>Nottinghamshire, NG17 2HU</Address3><TaxNumber/></VATNumberCustomer><TypeOfGoods>0</TypeOfGoods></Customer><InvoiceProperties><DocumentType>1</DocumentType><Disconto>.00</Disconto><Currency1>GBP</Currency1><Currency2/><InvoiceNumber>DNDNNDNEOEOEOEKE</InvoiceNumber><InvoiceDate>2006-04-03</InvoiceDate><NotationProperties><DecimalSeparator>.</DecimalSeparator><ThousandSeparator>,</ThousandSeparator></NotationProperties></InvoiceProperties><Item><Properties><Description>PANTS POUCH LADIES READI SMALL</Description><ItemClassificationCode>          </ItemClassificationCode><Number>1</Number><VATRate>.000</VATRate><Unit>EA</Unit><Reduction>0</Reduction><Amounts><UnitPriceExclVAT>3.55</UnitPriceExclVAT><TotalAmountExclVAT>3.55</TotalAmountExclVAT></Amounts><AdditionalProperties><PropertiesPerCountry Country="GB"><VATRateCode>F</VATRateCode><VATWarehouse>1</VATWarehouse><ExciseProductType>0</ExciseProductType></PropertiesPerCountry></AdditionalProperties><OutOfVAT>0</OutOfVAT><ReportingProperties><EngineParameters1/><EngineParameters2/><EngineParameters3/><CommodityCode>AA2741B</CommodityCode><IntrastatQuantity1>.000</IntrastatQuantity1><IntrastatUnit1>  </IntrastatUnit1><IntrastatQuantity2/><IntrastatUnit2/><StatisticalValue/><ModeOfTransport>   </ModeOfTransport><DeliveryConditions>FOB</DeliveryConditions></ReportingProperties></Properties><Conditions><ShipFrom><CountryDeparture>   </CountryDeparture></ShipFrom><ShipTo><Name>Meridian IQ (UK) Ltd</Name><Address>Unit 1 2,  aybro k R</Address><Zip>B76 1AL</Zip><City>Birmingham</City><CountryArrival>UK</CountryArrival></ShipTo><SupplyIn>1</SupplyIn><Transporter>1</Transporter></Conditions><OwnItemReference>1</OwnItemReference></Item><SendToReporting>0</SendToReporting><OwnReference>C10012514</OwnReference></iVATEngineInput></document></AnalyseDocument></soap:Body></soap:Envelope>

recvresp(): entered
HTTP/1.1 400 Bad Request
Date: Thu, 06 Apr 2006 15:02:37 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0


SetError() #13: HTTP/1.1 400 Bad Request
recvdoc parms: identity 0
recvdoc(): entered
SetError() #0:
SetError() #13: HTTP/1.1 400 Bad Request
http_close(): entered