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

RE: Bank Routing Number Validation Web Service



looks like the variable called "RoutNo" is not being populated ?

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Error occured when get webservices  record ---> System.Data.SqlClient.SqlException: Procedure or function 'getFedACHdirbyRoutingNumber' expects parameter '@RoutingNumber', which was not supplied.


usually the error 500 Internal Server Error

means the parameters were not passed or formatted correctly

to verify, I usually take the soap request and paste into notepad, format it, save as .html
and lanch via browser, if errors it highlights and points right to the error and I say duh!



thanks,
chris


________________________________________
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] on behalf of Buzz Fenner [bfenner@xxxxxxxxxxxxxxxx]
Sent: Tuesday, October 07, 2014 5:45 PM
To: Discussion FTP API (ftpapi@xxxxxxxxxxxxxxxxxxxxxx)
Subject: Bank Routing Number Validation Web Service

All,

First, this is my -first- opportunity to use a web service; if I can get this program up and running in a reasonable time frame, I hope my boss will be open to using web services more (which will give me the opportunity to learn more about them) with RPG. Some years ago, Scott K posted up some code to do bank routing number validation (http://www.scottklement.com/archives/ftpapi/200701/msg00017.html) which I found via the RPG List Archive. So I downloaded it and got to work. However, running his code "as is" kept returning empty data sets; it appears that the service used in the program has possibly been discontinued?

On the webservicex.net website, the link to the ABA Lookup service description (the WSDL Scott's code uses) now points to the newer one, FedACH. So, I imported the FedACH WSDL into SoapUI and created a request using the getACHByRoutingNumber service to see what the XML looked like. I inserted data, ran the request and got results. So I set about adapting Scott's code to match (more or less) what SoapUI generated.

I'm receiving internal server errors but the fault string mentions some procedure (?) that I did not see in the FedACH WSDL, and being a newbie, not able to decipher the error log which follows:

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

http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: JONESBOROCWL.ORG
DNS server found: 192.168.0.107
DNS server found: 192.168.0.106
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 /FedACH.asmx HTTP/1.1
Host: www.webservicex.net
User-Agent: http-api/1.24
Content-Type: text/xml
SOAPAction: http://www.webservicex.net/getACHByRoutingNumber
Content-Length: 357


senddoc(): entered
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:web="http://www.webservicex.net/";> <SOAP-ENV:Header/> <SOAP-ENV:Body> <web:GetACHByRoutingNumber> <web:RoutingNumber>102000021</web:RoutingNumber> </web:GetACHByRoutingNumber> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Length: 2582
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 07 Oct 2014 20:14:17 GMT
X-Cache: MISS from barracuda.jonesborocwl.org
Via: 1.1 barracuda.jonesborocwl.org (http_scan_byf/3.3.1)
Connection: keep-alive


SetError() #13: HTTP/1.1 500 Internal Server Error
recvresp(): end with 500
recvdoc parms: identity 2582
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:Server</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.Exception: Error occured when get webservices  record ---&gt; System.Data.SqlClient.SqlException: Procedure or function 'getFedACHdirbyRoutingNumber' expects parameter '@RoutingNumber', which was not supplied.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at ACH.FedACH.getACHByRoutingNumber(String RoutingNumber, FedACHList&amp; FedACHLists)
   --- End of inner exception stack trace ---
   at ACH.FedACH.getACHByRoutingNumber(String RoutingNumber, FedACHList&amp; FedACHLists)
   --- End of inner exception stack trace ---</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered

This is the snippet of code that creates the request and sends it to the server:

        SOAP=
         '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +
          <SOAP-ENV:Envelope +
               xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; +
               xmlns:web="http://www.webservicex.net/";> +
          <SOAP-ENV:Header/> +
          <SOAP-ENV:Body> +
             <web:GetACHByRoutingNumber> +
                <web:RoutingNumber>' + RoutNo + '</web:RoutingNumber> +
             </web:GetACHByRoutingNumber> +
          </SOAP-ENV:Body> +
          </SOAP-ENV:Envelope>';

        // ----------------------------------------------
        //  Send request to server, and get response
        // ----------------------------------------------

          soapfile = http_tempfile();

          rc = http_url_post( 'http://www.webservicex.net/FedACH.asmx'
                            : %addr(SOAP)+2
                            : %len(SOAP)
                            : soapfile
                            : HTTP_TIMEOUT
                            : HTTP_USERAGENT
                            : 'text/xml'
                            : 'http://www.webservicex.net/+
                               getACHByRoutingNumber');

Any help/suggestions will be greatly appreciated.

--
Buzz Fenner, Analyst/Systems Administrator
+1 (870) 930.3374 bfenner@xxxxxxxxxxxxxxxx<mailto:bfenner@xxxxxxxxxxxxxxxx>

City Water and Light of Jonesboro
Office: +1 (870) 935.5581 / Fax: +1 (870) 930.3301
Physical: 400 East Monroe Ave., Jonesboro, AR 72401
Mailing: PO Box 1289, Jonesboro, AR 72403-1289

This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. City Water and Light of Jonesboro is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------