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

RE: How to access returned XML doc on HTTP 500 error.



Hmmm.

It is pretty obvious...If you really aren't going into the PR, then you will have to use a different method of processing. Save the return XML to the IFS and process it from there.

Did you try something like this?

DIncoming PR
D msg52 s   52A

  Msg52 = name;
  Dsply msg52;
  // Rest of my incoming code



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Wayne Stemple
Sent: Tuesday, November 05, 2013 11:40 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Cc: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: How to access returned XML doc on HTTP 500 error.

I have double checked to make sure that on an error, my PR is not
accessed.  Here is the complete debug file that is created. As can be
clearly seen, there is error information contained in an XML document that
indicates the error that was found.  This is what I would like to get to
so that I can send it back to the program that called me.

HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0

http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'000001B6'
DNS default domain: olic.local
DNS server found: 172.31.120.105
DNS server found: 172.31.120.106
DNS server found: 8.8.8.8
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 6000
-----BEGIN CERTIFICATE-----

LINES HAVE BEEN DELETED ON PURPOSE FROM THE DEBUG FILE

-----END CERTIFICATE-----
Serial Number: 0E:CB:DB:15:B8:54:6E:F6:4F:81:98:A8:C6:B1:95:EB
Common Name: 53rddev.uhi.amerco
Country: US
State/Province: AZ
Locality: Phoenix
Org Unit: U-HAUL INTERNATIONAL INC
Org: Comodo Intranet SSL, OU=Issued through U-Haul International Inc.
E-PKI Manager, OU=INTRANET USE ONLY - NO WARRANTY ATTACHED - COMPANY NOT
VALIDATED, OU=WebTeam
PostalCode: 85004
Issuer CN: UTN-USERFirst-Hardware
Issuer Country: US
Issuer State/Province: UT
Issuer Locality: Salt Lake City
Issuer Org: The USERTRUST Network
Issuer Org Unit: http://www.usertrust.com
Version: 03
not before: 20091026170000
not after: 20141027165959
pub key alg: 1.2.840.113549.1.1.5

Protocol Used: TLS Version 1
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /BankTransactionAPIBasic/1.2.0/BankTransactionBasicService.asmx?wsdl
HTTP/1.1
Host: 53rddev.uhi.amerco
User-Agent: http-api/1.24
Content-Type: text/xml
Content-Length: 2048

senddoc(): entered
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ban="http://bankauth.uhi.amerco";><soapenv:Header><ban:AuthHeader><ban:Password>password</ban:Password><ban:UserName>username</ban:UserName></ban:AuthHeader></soapenv:Header><soapenv:Body><ban:Credit_PreAuthorization><ban:creditCardTransaction><
ban:ExtensionData/><ban:AccountNumber>9999999999999999</ban:AccountNumber><ban:ContractReferenceNumber>12345</ban:ContractReferenceNumber><ban:Entity><ban:ExtensionData/><ban:EntityNumber>9999</ban:EntityNumber></ban:Entity><ban:LocalDateTime>2013-11
-05T09:49:25.797</ban:LocalDateTime><ban:SystemMemberInfo><ban:ExtensionData/><ban:SystemMemberGuid>00000000-0000-0000-0000-000000000000</ban:SystemMemberGuid><ban:SystemMemberName>Matt
Diaz</ban:SystemMemberName></ban:SystemMemberInfo><ban:TransactionEntryMethod>MailOrPhoneOrder</ban:TransactionEntryMethod><ban:AmountTotalRequested>1.00</ban:AmountTotalRequested><ban:CardHolderContactInfo><ban:ExtensionData/><ban:Address>2727
N. Central
Ave.</ban:Address><ban:City>Phoenix</ban:City><ban:Country>US</ban:Country><ban:Name>Matt
Diaz</ban:Name><ban:State>AZ</ban:State><ban:ZipCode>85004</ban:ZipCode></ban:CardHolderContactInfo><ban:ExpirationDate>2013-12-31</ban:ExpirationDate><ban:CardSecurityCode>222</ban:CardSecurityCode></ban:creditCardTransaction></ban:Credit_PreAuthori
zation></soapenv:Body></soapenv:Envelope>                                 
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Date: Tue, 05 Nov 2013 16:54:51 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 503

SetError() #13: HTTP/1.1 500 Internal Server Error
recvresp(): end with 500
recvdoc parms: identity 503
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server
was unable to read request. ---&gt; There is an error in XML document (1,
1111). ---&gt; Instance validation error: 'US' is not a valid value for
Country.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered

Wayne Stemple,
Oxford Life Insurance

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------