Page 1 of 1

Business Registry Basic Information Search

Posted: Wed Feb 22, 2023 7:55 am
by tomtagaris
Can someone help me use it to get data from the tax website
according to the attached file
Τηανκσ

Re: Business Registry Basic Information Search

Posted: Wed Feb 22, 2023 12:14 pm
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>

Re: Business Registry Basic Information Search

Posted: Wed Feb 22, 2023 3:18 pm
by edk
Here you have the program code to communicate with the web service.
wsaade.7z
(2.18 KiB) Downloaded 213 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 213 times
Πρέπει να έχετε login και κωδικό πρόσβασης για την υπηρεσία, για το λόγο αυτό δεν έχω δοκιμάσει πλήρως.
Οι απαντήσεις από την υπηρεσία web είναι σε xml, αλλά θα πρέπει να μπορείτε να το χειριστείτε.
Να θυμάστε ότι τα αιτήματα και οι απαντήσεις κωδικοποιούνται σε UTF-8!

Re: Business Registry Basic Information Search

Posted: Wed Feb 22, 2023 5:46 pm
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

Re: Business Registry Basic Information Search

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

Serge

Re: Business Registry Basic Information Search

Posted: Fri Feb 24, 2023 8:16 am
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.

Re: Business Registry Basic Information Search

Posted: Fri Feb 24, 2023 8:20 am
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

Re: Business Registry Basic Information Search

Posted: Fri Feb 24, 2023 8:32 am
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.

Re: Business Registry Basic Information Search

Posted: Fri Feb 24, 2023 8:39 am
by tomtagaris
YES
EDK YOU ARE THE BEST
ΤΗΑΝΚΣ ΤΗΑΝΚΣ ΤΗΑΝΚΣ