Local Census REST/SOAP

Hello,

My question is oriented towards the implementation of the Local Census in Consul with a Rest service and not Soap.

In the official page it makes it very clear that to integrate it, the service must be SOAP, but at the same time it is using a JSON which in my view does not make much sense (it should be a xml) . My situation is that I am building the web service directly on a DB and I have the doubt if the obligation is that it is Soap and then it would go with Xml or instead a JSON is used and then the web service is REST.

If anyone could help me I would really appreciate it.

Best regards

Excuse me, I have some urgency with this issue, if someone could help me I would appreciate it very much.

Best regards.

Hi PVP18, sorry for the late response …

What we call Local Census does not connect with any remote service, it stores in the Consul database the entries you want, you can import the records with a CSV file and the verification data the user will introduce will be verified against this database and if the data provided by the user matches with the data of a record this user will be marked as verifier user and will be able to do.

The RemoteCensus is the one that connects with the RemoteService but as the documentation says it will only work with this especific SOAP service. If you need to connect the users verification with your remote service and this service is REST you will need to add a class that deals your service. If you cannot for any reason maybe the LocalCensus solution could work for you.

If you decide to develop you own RemoteCensusRESTApi connector it will be nice if you share with the Consul community so we can include your work within the main repository so other users like you could have this problem solved.

I hope this helps you.
Best regards

Hi endero, thank you very much for your response. I have one more question.

Once the connection data is entered, whether the local census or the remote census is chosen, what way do you have to verify that a user is verified? In other words, at what point is it verified that the user belongs to the city’s census? When is a proposal voted or when a final budget voting process is carried out?

I have done the integration but I am not sure how to check that I have done it correctly. If you could help me I would really appreciate it.

Thank you very much.
Regards

Hi,

I`ve discovered that you had to disable a feature in the general settings in order to enable user verification. Now I run into the problem that it needs to be integrated with a sms platform.

Can someone tell me the configuration that needs to be done to be able to send sms? What files do you have to modify and which info is necesary to include? Or how to desactivate this aditional verification?

Thank you very much.
Regards

You can edit
/home/deploy/consul/current/app/models/concerns/verification.rb
In order to "return true"in “SMS_Verified” functions

Thank you very much dld, I understand this option is to desactivate the module “sms verification”?

Yes, SMS and, if you want, in the same file, you can do the same with confirmation letter

Ok, so if I return true in this functions, automatically disapears this steps when you are going to verify an account leaving only the verification with the census?
Do I have to modify some other file for the html?

That’s ok. It’s enough with that I think.

Thank you very much dld. Do you have an example of this file?. I’m modifying it but something it’s not working…

Relevant code:

 def verification_sms_sent?
    return true 
  end
  def verification_letter_sent?
    return true 
  end
  def sms_verified?
    return true 
 end
  def level_two_verified?
    return residence_verified?
 end

Ah, maybe you can consider edit app/views/verification/residence/new.html.erb in order to Hide Step 2 and Setp 3 info…

1 Like

Thank you very much dld. I did it and now I can verify accounts but I dont exactly know how to edit the new.html.erb in order to hide Step 2 and Step 3.

I’m not sure if I have to modify the content of the “Submit” button from Step 1 to refer it to Step 3 directly and how to do this …

Sorry for the insistence

I mean, something like this:

  <div class="small-4 column verification-step">
          <!--   <span class="number">2</span> <%= t("verification.step_2") %>-->
  </div>
  <div class="small-4 column verification-step">
          <!--        <span class="number">3</span> <%= t("verification.step_3") %>-->
  </div>

Yes I did it. I mean that when you click the “Verify Residence” button, moves you to the “SMS Confirmation” Step 2 even if you have cut what you indicated. Thats why I think that I have to modify the button but I dont know how
image

Step 2 tells me that the user it’s not a “level_three_user” (factores de identificación, 1 padrón, 2 sms, 3 carta). I don’t think you have to modify Views

def level_two_verified?
return residence_verified?
end
def level_three_verified? (i forgot)
return residence_verified?
end

residence_verified it’s returning a TRUE?

Hi dld
I have the same problem.
And I would like to ask you about the residence/new.
Did you find a way to make functional all this steps of residence (1.RESIDENCE, 2. CONIRMATION CODE, 3. FINAL CONFIRMATION).
When I follow this step ( def verification_sms_sent?
return true
end
def verification_letter_sent?
return true
end
def sms_verified?
return true
end
def level_two_verified?
return residence_verified?
end)
I don’t see residence form.