Business Registry Basic Information Search

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
tomtagaris
Posts: 113
Joined: Tue Aug 23, 2016 2:43 pm

Business Registry Basic Information Search

Post by tomtagaris »

Can someone help me use it to get data from the tax website
according to the attached file
Τηανκσ
Attachments
RgWsPublic2DevelopersInfoV1.0_0.zip
(9.22 KiB) Downloaded 195 times
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Business Registry Basic Information Search

Post by edk »

Hi.
To get access to the service you need a valid token: username and password. Do you have such authorization data? Can you send in private?
Without this data, I get this feedback: "Ο συνδυασμός χρήστη/κωδικού πρόσβασης που δόθηκε δεν είναι έγκυρού"
I also need some sample AFM, called by and called for ids for testing.

Γεια.
Για να αποκτήσετε πρόσβαση στην υπηρεσία χρειάζεστε ένα έγκυρο διακριτικό: όνομα χρήστη και κωδικό πρόσβασης. Έχετε τέτοια στοιχεία εξουσιοδότησης; Μπορείτε να στείλετε ιδιωτικά; Χωρίς αυτά τα δεδομένα, λαμβάνω αυτό το feedback: "Ο συνδυασμός χρήστη/κωδικού πρόσβασης που δόθηκε δεν είναι έγκυρος"; Χρειάζομαι επίσης ένα δείγμα AFM, που έχει καλέσει και ζητήσει αναγνωριστικά για δοκιμή.

Code: Select all

<ns1:Security>
	<ns1:UsernameToken>
		<ns1:Username>XXXXXXXXXXXXXX</ns1:Username>
		<ns1:Password>YYYYYYYYYYYY</ns1:Password>
	</ns1:UsernameToken>
</ns1:Security>
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Business Registry Basic Information Search

Post by edk »

Here you have the program code to communicate with the web service.
wsaade.7z
(2.18 KiB) Downloaded 185 times
You must have a login and password for the service, for this reason I have not tested comprehensively.
The responses from the web service are in xml, but you should be able to handle that.
Remember that requests and responses are encoded in UTF-8!

Εδώ έχετε τον κωδικό προγράμματος για να επικοινωνήσετε με την υπηρεσία web.
wsaade.7z
(2.18 KiB) Downloaded 185 times
Πρέπει να έχετε login και κωδικό πρόσβασης για την υπηρεσία, για το λόγο αυτό δεν έχω δοκιμάσει πλήρως.
Οι απαντήσεις από την υπηρεσία web είναι σε xml, αλλά θα πρέπει να μπορείτε να το χειριστείτε.
Να θυμάστε ότι τα αιτήματα και οι απαντήσεις κωδικοποιούνται σε UTF-8!
User avatar
tomtagaris
Posts: 113
Joined: Tue Aug 23, 2016 2:43 pm

Re: Business Registry Basic Information Search

Post by tomtagaris »

THE PROGRAM IS PERFECT
I TRIED IT AND IT'S VERY GOOD
THANK YOU FOR GETTING ME OUT OF DIFFICULT SITUATIONS
I HAVE NO WORDS TO THANK YOU
THANKS
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Business Registry Basic Information Search

Post by serge_girard »

Mr. EDK is a genius on XML and JSON stuff !

Serge
There's nothing you can do that can't be done...
User avatar
nekbmm
Posts: 122
Joined: Sat Jul 16, 2016 3:16 am
DBs Used: DBF,SQLite
Location: Ivanjica, Serbia

Re: Business Registry Basic Information Search

Post by nekbmm »

serge_girard wrote: Fri Feb 24, 2023 7:44 am Mr. EDK is a genius on XML and JSON stuff !

Serge
Thanks EDK.
User avatar
tomtagaris
Posts: 113
Joined: Tue Aug 23, 2016 2:43 pm

Re: Business Registry Basic Information Search

Post by tomtagaris »

Something else
what am i doing wrong and i can't get data
DO CASE
CASE cKey == "afm" .AND. cPath == "Envelope/Body/rgWsPublic2AfmMethodResponse/result/rg_ws_public2_result_rtType/basic_rec"
msgbox(xValue)
CASE cKey == "doy" .AND. cPath == "Envelope/Body/rgWsPublic2AfmMethodResponse/result/rg_ws_public2_result_rtType/basic_rec"
msgbox(xValue)
end case
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Business Registry Basic Information Search

Post by edk »

I don't have the real data I got from the web service, but based on the WSD I'm guessing it should look like this (don't forget namespace in tags if they are in xml file):

Code: Select all

CASE cKey == "afm" .AND. cPath == "env:Envelope/env:Body/srvc:rgWsPublic2AfmMethodResponse/srvc:result/rg_ws_public2_result_rtType/basic_rec"
		Msgdebug ( xValue )
		IF hb_HHasKey( hAttrib, "xsi:nil" )
			xAttribValue := hAttrib ["xsi:nil"] 
			Msgdebug ( xAttribValue )
		ENDIF

	CASE cKey == "doy" .AND. cPath == "env:Envelope/env:Body/srvc:rgWsPublic2AfmMethodResponse/srvc:result/rg_ws_public2_result_rtType/basic_rec"
		Msgdebug ( xValue )
		IF hb_HHasKey( hAttrib, "xsi:nil" )
			xAttribValue := hAttrib ["xsi:nil"] 
			Msgdebug ( xAttribValue )
		ENDIF
Send the file with the respond you received so that I can check with real data.
User avatar
tomtagaris
Posts: 113
Joined: Tue Aug 23, 2016 2:43 pm

Re: Business Registry Basic Information Search

Post by tomtagaris »

YES
EDK YOU ARE THE BEST
ΤΗΑΝΚΣ ΤΗΑΝΚΣ ΤΗΑΝΚΣ
Post Reply