Guess I should clarify, I am not using reg_system.cgi. I have written my own Java API that communicates directly with OpenSRS servers using their XML protocol. This works great most of the time. It even works when i try to register a CA domain with an invalid province, i.e. OpenSRS will return a properly formatted error response indicating bad input.
However, when the phone number is invalid, OpenSRS can't seem to build a properly formatted XML response message. Maybe because the CA registrars response has some bad characters in it or something. OpenSRS should be able to deal with all error responses from registries, and pass them on to clients. I do as much data validation as is technically feasible, i.e. phone number needs to be 10 digits. But believe it or not, the CA registrar actually checks area codes and following 3 digits to be valid canadian phone numbers. I'm not about to commit myself to maintaining a huge table of valid phone numbers for all of canada. Naturally users will occasionally enter invalid data, and the server will generate an error. That is perfectly acceptable, but the error should be returned in the proper format as specified by their protocol spec. Klaus >From: "FluxCenter.com Tech Support" <[EMAIL PROTECTED]> >To: "klaus rubba" <[EMAIL PROTECTED]> >Subject: Re: truncated response? >Date: Tue, 26 Mar 2002 11:37:13 -0500 > >Users will always feed information that >involuntary will cause the registration >especially problems, >the only way to avoid this completly >and still have instant registrations >is to edit the reg_system.cgi >and and ad a field checker, >but for this you would have to know >exactly >what will cause the error so the script can prompt >the user before going trough with the registrations. >(number format, number starts with .....) > >If you arr good with perl regexp >you can do this yourself, >if not I can do it for you, >but you have to tell me what info is required >in order so it does not produce an error > >B. > > >----- Original Message ----- >From: "klaus rubba" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, March 26, 2002 11:33 AM >Subject: Re: truncated response? > > > > Hmm, not sure i understand what you are saying... I want to keep doing > > instant registrations otherwise I won't know if the registration >succeeded > > or failed. By 'fed information' do you mean the CA registrar response? I > > realize they do some additional input verification, but shouldn't the >error > > they return be stuffed neatly into a complete response message by >OpenSRS? > > > > > > >From: "FluxCenter.com Tech Support" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Subject: Re: truncated response? > > >Date: Mon, 25 Mar 2002 18:08:51 -0500 > > > > > >Set in the admin console > > >in the tech 'tab' not to do instant registrations > > >if you want to avoid messages like this. > > >It is really the fed information fault, > > >not Opensrs client. > > > > > > > > >B. > > > > > > > > >----- Original Message ----- > > >From: "klaus rubba" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Sent: Monday, March 25, 2002 5:45 PM > > >Subject: truncated response? > > > > > > > > > > > > > > Hi there, > > > > > > > > When I try registering a CA domain with an invalid canadian phone > > >number, > > >I > > > > get an error response as expected. However, this error response is > > > > mysteriously truncated so that my program barphs when it tries to >parse > > >the > > > > XML. Any idea's why this might be happening? > > > > > > > > Here's a sample XML response, last line received is the one with > > > > transaction_id: > > > > > > > > > > > > <?xml version='1.0' encoding="UTF-8" standalone="no" ?> > > > > <!DOCTYPE OPS_envelope SYSTEM "ops.dtd"> > > > > <OPS_envelope> > > > > <header><version>0.9</version></header> > > > > <body> > > > > <data_block> > > > > <dt_assoc> > > > > <item key="is_success">0</item> > > > > <item key="protocol">XCP</item> > > > > <item key="object">DOMAIN</item> > > > > <item key="attributes"> > > > > <dt_assoc> > > > > <item key="registration_text">Command failed > > > > The following error(s) are related to the administrative contact: > > > > 1231231233 Invalid phone number : 1231231233 > > > > 1231231233 Invalid fax number : 1231231233 > > > > End of error(s) related to administrative contact. > > > > : </item> > > > > <item key="registration_code">400</item> > > > > <item key="id">401575</item> > > > > </dt_assoc> > > > > </item> > > > > <item key="response_text">Command failed > > > > The following error(s) are related to the administrative contact: > > > > 1231231233 Invalid phone number : 1231231233 > > > > 1231231233 Invalid fax number : 1231231233 > > > > End of error(s) related to administrative contact. > > > > : </item> > > > > <item key="response_code">400</item> > > > > <item key="transaction_id">Mon Mar 25 17:36:57 2002_Child#273667 > > > > > > > > _________________________________________________________________ > > > > Join the world�s largest e-mail service with MSN Hotmail. > > > > http://www.hotmail.com > > > > > > > > > > > > > > > > > > > > > _________________________________________________________________ > > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > > _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com
