This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1] 2
1
Web Server - Ask For Help / 2 way certificate authentication
« on: December 10, 2024, 06:05:59 AM »
Hi,
I have a webservice which I'm going to use as an API server.
Normaly I create a self signed certificate with openssl and give the other party my public key.
ThisWebserver.SSL = 1 ! Use SSL to make a Secure Web Server
ThisWebserver.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
ThisWebserver.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
ThisWebserver.SSLCertificateOptions.CertificateFile = 'c:\webservice\certificates\deo.aag.nl.crt'
ThisWebserver.SSLCertificateOptions.PrivateKeyFile = 'c:\webservice\certificates\deo.aag.nl.key'
ThisWebserver.SSLCertificateOptions.ServerName = 'deo.aag.nl'
The other party asked me for the CSR file and signed this file to Afile.p7b
But I don't know how and where I should install or embed it.
Any Ideas?
Regards Joep
I have a webservice which I'm going to use as an API server.
Normaly I create a self signed certificate with openssl and give the other party my public key.
ThisWebserver.SSL = 1 ! Use SSL to make a Secure Web Server
ThisWebserver.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
ThisWebserver.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
ThisWebserver.SSLCertificateOptions.CertificateFile = 'c:\webservice\certificates\deo.aag.nl.crt'
ThisWebserver.SSLCertificateOptions.PrivateKeyFile = 'c:\webservice\certificates\deo.aag.nl.key'
ThisWebserver.SSLCertificateOptions.ServerName = 'deo.aag.nl'
The other party asked me for the CSR file and signed this file to Afile.p7b
But I don't know how and where I should install or embed it.
Any Ideas?
Regards Joep
2
Web Server - Ask For Help / Strange behaviour of NetEncryptString and NetDecryptString
« on: August 26, 2024, 12:09:07 AM »
I use NetEncryptString and NetDecryptString to decrypt passwords. So they won't show there initial value in the database.
Example:
Usr:Wachtwoord = NetEncryptString(lWachtwoord,len(lWachtwoord),'xxxxxxx')
And to show it again or to validate the paswords
lWachtwoordString = usr:Wachtwoord
lWachtwoord = NetDecryptString(lWachtwoordString,len(lWachtwoordString),'xxxxxxx')
But not all of the paswords can be decrypted.
These are some values and the indication wheter they can be decrypted:
- AA34&&&^ yes
- AA$A8nt56Y yes
- $$34er$ no
- A3gh2$ yes
- B3gh2$ no
Can someone tell me why some values cannot be decrypted?
Regards
Joep
Example:
Usr:Wachtwoord = NetEncryptString(lWachtwoord,len(lWachtwoord),'xxxxxxx')
And to show it again or to validate the paswords
lWachtwoordString = usr:Wachtwoord
lWachtwoord = NetDecryptString(lWachtwoordString,len(lWachtwoordString),'xxxxxxx')
But not all of the paswords can be decrypted.
These are some values and the indication wheter they can be decrypted:
- AA34&&&^ yes
- AA$A8nt56Y yes
- $$34er$ no
- A3gh2$ yes
- B3gh2$ no
Can someone tell me why some values cannot be decrypted?
Regards
Joep
3
The Rest - Ask For Help / Strange behaviour of NetEncryptString and NetDecryptString
« on: August 19, 2024, 05:11:08 AM »
I use NetEncryptString and NetDecryptString to decrypt passwords. So they won't show there initial value in the database.
Example:
Usr:Wachtwoord = NetEncryptString(lWachtwoord,len(lWachtwoord),'xxxxxxx')
And to show it again or to validate the paswords
lWachtwoordString = usr:Wachtwoord
lWachtwoord = NetDecryptString(lWachtwoordString,len(lWachtwoordString),'xxxxxxx')
But not all of the paswords can be decrypted.
These are some values and the indication wheter they can be decrypted:
- AA34&&&^ yes
- AA$A8nt56Y yes
- $$34er$ no
- A3gh2$ yes
- B3gh2$ no
Can someone tell me why some values cannot be decrypted?
Regards
Joep
Example:
Usr:Wachtwoord = NetEncryptString(lWachtwoord,len(lWachtwoord),'xxxxxxx')
And to show it again or to validate the paswords
lWachtwoordString = usr:Wachtwoord
lWachtwoord = NetDecryptString(lWachtwoordString,len(lWachtwoordString),'xxxxxxx')
But not all of the paswords can be decrypted.
These are some values and the indication wheter they can be decrypted:
- AA34&&&^ yes
- AA$A8nt56Y yes
- $$34er$ no
- A3gh2$ yes
- B3gh2$ no
Can someone tell me why some values cannot be decrypted?
Regards
Joep
4
Web Server - Ask For Help / p_web.ParseHTML not returning anything
« on: March 25, 2021, 07:26:59 AM »
I created a new webservice with a NetWebserviceMethod
In the processed code embed I consume the incoming xml and create a few records in SQL Server.
All the actions work.
And at the end I want to notify the person or system that sended the xml to consume.
In my old service I could do this with "p_web.ParseHTML(XmlResponse,1,len(XmlResponse),NET:NoHeader)"
Since I moved to a NetWebserviceMethod the p_web.ParseHTML isn't returning anything.
XmlResponse is a simple xmlstring which notifice the other person or system that the incoming xml is consumed correctly
Has Anyone an idea why p_web.ParseHTML isn't working?
Regards,
Joep
In the processed code embed I consume the incoming xml and create a few records in SQL Server.
All the actions work.
And at the end I want to notify the person or system that sended the xml to consume.
In my old service I could do this with "p_web.ParseHTML(XmlResponse,1,len(XmlResponse),NET:NoHeader)"
Since I moved to a NetWebserviceMethod the p_web.ParseHTML isn't returning anything.
XmlResponse is a simple xmlstring which notifice the other person or system that the incoming xml is consumed correctly
Has Anyone an idea why p_web.ParseHTML isn't working?
Regards,
Joep
5
Web Server - Ask For Help / webservice web:lastPost get filled but it doesn't get to the processed code
« on: February 23, 2021, 06:38:11 AM »
Hi all
I have got a webservice up and running for a client where some data on a website is processed into the database.
Like the most customers they like some new stuff, so I went making this in my webservice.
But my webservice does not work properly anymore.
web.LastPost is filled with the xml I posted. That part works.
But in NetWebPage procedure the processed code embed never runs.
The xml looks fine in the web.LastPost
POST /Xml2Aag HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Content-Length: 6557
Host: localhost:88
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)
<?xml version="1.0" encoding="utf-16"?>
<form>
etc.........
The NetwebPage is from the prototype (NetWebServerWorker p_web)
Any idea's why the webservice doesn't get to the processed code embed anymore?
Regards,
Joep
I have got a webservice up and running for a client where some data on a website is processed into the database.
Like the most customers they like some new stuff, so I went making this in my webservice.
But my webservice does not work properly anymore.
web.LastPost is filled with the xml I posted. That part works.
But in NetWebPage procedure the processed code embed never runs.
The xml looks fine in the web.LastPost
POST /Xml2Aag HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Content-Length: 6557
Host: localhost:88
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)
<?xml version="1.0" encoding="utf-16"?>
<form>
etc.........
The NetwebPage is from the prototype (NetWebServerWorker p_web)
Any idea's why the webservice doesn't get to the processed code embed anymore?
Regards,
Joep
6
Web Server - Ask For Help / fatal alert: handshake_failure with webservice
« on: May 28, 2020, 06:14:07 AM »
I have a webservice which works perfect insecure.
Lately they asked me to make the webservice Secure.
So I got an signed certificate which I use on a local area network.
I can address the webservice by "https://swa843t.ka.haagnet.net:443/Xml2Aag"
Secure port : 443
Certificate folder : c:\temp\certificates
Ca Account : swa843t.ka.haagnet.net
Domains : swa843t.ka.haagnet.net
But I keep getting errors:
ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
ERROR:An error occurred [Received fatal alert: handshake_failure], see error log for details
INFO:Error getting response for [https://swa843t.ka.haagnet.net:443.Xml2aag:DenHaag_XML2AAG]; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I have got the certificate in place:
swa843t.ka.haagnet.net.crt and
swa843t.ka.haagnet.net.key
These certificates where created from an exported windows certificate to an pfx file
And the crt and key where created with openssl
Anyone an Idea what could cause this?
Kind regards Joep
Lately they asked me to make the webservice Secure.
So I got an signed certificate which I use on a local area network.
I can address the webservice by "https://swa843t.ka.haagnet.net:443/Xml2Aag"
Secure port : 443
Certificate folder : c:\temp\certificates
Ca Account : swa843t.ka.haagnet.net
Domains : swa843t.ka.haagnet.net
But I keep getting errors:
ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
ERROR:An error occurred [Received fatal alert: handshake_failure], see error log for details
INFO:Error getting response for [https://swa843t.ka.haagnet.net:443.Xml2aag:DenHaag_XML2AAG]; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I have got the certificate in place:
swa843t.ka.haagnet.net.crt and
swa843t.ka.haagnet.net.key
These certificates where created from an exported windows certificate to an pfx file
And the crt and key where created with openssl
Anyone an Idea what could cause this?
Kind regards Joep
7
Web Server - Ask For Help / webservice doesn't get to processed code in NetWebpage after database down
« on: April 29, 2019, 05:57:23 AM »
Hi all,
I have a webservice which consumes received xml's.
Everything is working fine when connected to the database.
But when the connection is lost, I can't get the service to work after the database is up again.
The server window still receives the web:LastPost but it doesn't get to the processed code in the netWebPage.
What is the proper way to deal with a database that went down and up?
Regards Joep
I have a webservice which consumes received xml's.
Everything is working fine when connected to the database.
But when the connection is lost, I can't get the service to work after the database is up again.
The server window still receives the web:LastPost but it doesn't get to the processed code in the netWebPage.
What is the proper way to deal with a database that went down and up?
Regards Joep
8
Web Server - Ask For Help / base64 encoded string won't save to file after str.base64Decode()
« on: August 03, 2018, 05:35:18 AM »
Hi All,
from a soap request I got a response in xml with several tag's and one tag containing the encoded file.
To save the file to disk I decode it and save it afterwords.
This is the code:
lExtensie=str.Between('<FileExtension>','</FileExtension>')
lFile=str.Between('<FileBytes>','</FileBytes>')
str.SetValue(Clip(lFile)) !***length of the string equals length in xml string (SetValue is correct)
str.Base64Decode()
!lFileName='e:\temp\' & Clip(Glo:DmsLastDoc) & Clip(lExtensie)
lFileName='temp.docx'
lConnectPos=str.SaveFile(Clip(lFileName))
message('lFilename=' & Clip(lFilename) & 'Error on Save=' & lConnectPos) !*** lConnectpos = 0
If Exists(Clip(lFileName)) Then ShowFoto(Clip(lFileName)).
But str.SaveFile returns zero.
Any ideas?
Regards,
Joep
from a soap request I got a response in xml with several tag's and one tag containing the encoded file.
To save the file to disk I decode it and save it afterwords.
This is the code:
lExtensie=str.Between('<FileExtension>','</FileExtension>')
lFile=str.Between('<FileBytes>','</FileBytes>')
str.SetValue(Clip(lFile)) !***length of the string equals length in xml string (SetValue is correct)
str.Base64Decode()
!lFileName='e:\temp\' & Clip(Glo:DmsLastDoc) & Clip(lExtensie)
lFileName='temp.docx'
lConnectPos=str.SaveFile(Clip(lFileName))
message('lFilename=' & Clip(lFilename) & 'Error on Save=' & lConnectPos) !*** lConnectpos = 0
If Exists(Clip(lFileName)) Then ShowFoto(Clip(lFileName)).
But str.SaveFile returns zero.
Any ideas?
Regards,
Joep
9
Web Server - Ask For Help / how to keep http session alive with multiple soap posts
« on: August 02, 2018, 06:48:44 AM »
Hi All,
I have to make 2 soap posts to a webservice.
- first request (in xml) provides the webservice with some parameters like (username, password, system etc..
in return I receive "<connectResult>true</connectResult>" in xml, so I know the connection succeeded.
- In the above packetreceived I then know I can perform the second post.
This works, but the second time I get a "not connected" from the server.
What can I do to keep the session alive?
The first post:
lCountRequest=0
PostString = '<?xml version="1.0" encoding="utf-8"?>'&|
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'&|
'<soap:Body>'&|
'<Connect xmlns="http://bct.nl">'&|
'<ApplicationID>AAG</ApplicationID>'&|
'<ConnectionID>'&Glo:DmsDbId&'</ConnectionID>'&|
'<UserName>system</UserName>'&|
'<Password>sys</Password>'&|
'<EncodedPass>false</EncodedPass>'&|
'</Connect>'&|
'</soap:Body>'&|
'</soap:Envelope>'
cSoap.CanUseProxy = 1 ! Can use a proxy
cSoap.HeaderOnly = 0 ! We want the whole page
cSoap.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
cSoap.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
cSoap.InActiveTimeout = 9000 ! Set IdleTimeout 90 seconds
cSoap.ConnectionKeepAlive = 0
cSoap.ContentType = 'text/xml; charset=utf-8'
cSoap.AcceptEncoding = ''
cSoap.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
cSoap.customheader = 'SOAPAction: "http://bct.nl/Connect"'
PacketSent = PostString
clear(PacketReceived)
cSoap.Post('http://localhost/wsCorsa7/Corsa72WS.asmx', Clip(PostString))
If cSoap.Error
Message ('Could not be post the SOAP request to this web service. Error ' & cSoap.Error |
& ': ' & cSoap.InterpretError())
SetCursor()
end
Second post:
PostString = '<?xml version="1.0" encoding="utf-8"?>'&|
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'&|
'<soap:Body>'&|
'<GetFileVersion xmlns="http://bct.nl">'&|
'<ObjectType>S</ObjectType>'&|
'<ObjectID>'&Clip(Glo:DmsLastDoc)&'</ObjectID>'&|
'<FileType>ftArchive</FileType>'&|
'<FileVersion>0</FileVersion>'&|
'</GetFileVersion>'&|
'</soap:Body>'&|
'</soap:Envelope>'
cSoap.customheader = 'SOAPAction: "http://bct.nl/GetFileVersion"'
! The packet is contstructed, so you can post it to the webservice
PacketSent = PostString
clear(PacketReceived)
!PostUrl = 'http://localhost/wsCorsa7/Corsa72WS.asmx'
cSoap.Post('http://localhost/wsCorsa7/Corsa72WS.asmx', Clip(PostString))
If cSoap.Error
Message ('Could not be post the SOAP request to this web service. Error ' & cSoap.Error |
& ': ' & cSoap.InterpretError())
SetCursor()
end
Regards Joep
I have to make 2 soap posts to a webservice.
- first request (in xml) provides the webservice with some parameters like (username, password, system etc..
in return I receive "<connectResult>true</connectResult>" in xml, so I know the connection succeeded.
- In the above packetreceived I then know I can perform the second post.
This works, but the second time I get a "not connected" from the server.
What can I do to keep the session alive?
The first post:
lCountRequest=0
PostString = '<?xml version="1.0" encoding="utf-8"?>'&|
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'&|
'<soap:Body>'&|
'<Connect xmlns="http://bct.nl">'&|
'<ApplicationID>AAG</ApplicationID>'&|
'<ConnectionID>'&Glo:DmsDbId&'</ConnectionID>'&|
'<UserName>system</UserName>'&|
'<Password>sys</Password>'&|
'<EncodedPass>false</EncodedPass>'&|
'</Connect>'&|
'</soap:Body>'&|
'</soap:Envelope>'
cSoap.CanUseProxy = 1 ! Can use a proxy
cSoap.HeaderOnly = 0 ! We want the whole page
cSoap.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
cSoap.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
cSoap.InActiveTimeout = 9000 ! Set IdleTimeout 90 seconds
cSoap.ConnectionKeepAlive = 0
cSoap.ContentType = 'text/xml; charset=utf-8'
cSoap.AcceptEncoding = ''
cSoap.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
cSoap.customheader = 'SOAPAction: "http://bct.nl/Connect"'
PacketSent = PostString
clear(PacketReceived)
cSoap.Post('http://localhost/wsCorsa7/Corsa72WS.asmx', Clip(PostString))
If cSoap.Error
Message ('Could not be post the SOAP request to this web service. Error ' & cSoap.Error |
& ': ' & cSoap.InterpretError())
SetCursor()
end
Second post:
PostString = '<?xml version="1.0" encoding="utf-8"?>'&|
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'&|
'<soap:Body>'&|
'<GetFileVersion xmlns="http://bct.nl">'&|
'<ObjectType>S</ObjectType>'&|
'<ObjectID>'&Clip(Glo:DmsLastDoc)&'</ObjectID>'&|
'<FileType>ftArchive</FileType>'&|
'<FileVersion>0</FileVersion>'&|
'</GetFileVersion>'&|
'</soap:Body>'&|
'</soap:Envelope>'
cSoap.customheader = 'SOAPAction: "http://bct.nl/GetFileVersion"'
! The packet is contstructed, so you can post it to the webservice
PacketSent = PostString
clear(PacketReceived)
!PostUrl = 'http://localhost/wsCorsa7/Corsa72WS.asmx'
cSoap.Post('http://localhost/wsCorsa7/Corsa72WS.asmx', Clip(PostString))
If cSoap.Error
Message ('Could not be post the SOAP request to this web service. Error ' & cSoap.Error |
& ': ' & cSoap.InterpretError())
SetCursor()
end
Regards Joep
10
The Rest - Ask For Help / Xfiles hard to get right value from dictionary
« on: May 18, 2018, 05:36:36 AM »
Hi There,
I'm using Xfiles to make me a table summary of the dictionary.
To do so I make an export of the dictionary.
This is a piece of that dictionary output.
<Table Guid="{07975131-522f-43f1-992f-48d3ae016a18}" Ident="9" Name="Alg201" Description="Beheerders" Prefix="Alg201" Driver="MSSQL" Owner="!Glo:ConnectString" Path="!GFN:Alg201" Thread="true" Bindable="true">
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedDate="16 MAY 2018" ModifiedTime=" 1:14:19PM" ModifiedVersionNumber="1"/>
<Field Guid="{f352d24a-ecb6-4e3d-af9e-bb2b8f054f3c}" Ident="98" Name="BehCode" Description="Code beheerder" DataType="LONG" Size="4" ScreenPicture="@N6_" ScreenPrompt="Code:" ReportHeading="Code" Message="Code beheerder" ReportControl=" STRING(@N6_),USE(Alg201:BehCode)">
<WindowControl>
<Line Text=" PROMPT('Code:'),USE(?Alg201:BehCode:Prompt)"/>
<Line Text=" ENTRY(@N6_),USE(Alg201:BehCode),MSG('Code beheerder'),REQ"/>
</WindowControl>
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedDate="18 JUN 2015" ModifiedTime=" 4:46:11PM" ModifiedVersionNumber="1"/>
<Validity Check="NONZERO"/>
</Field>
<Field Guid="{35ae3c1d-26d4-4e71-bc29-23109131b07d}" Ident="99" Name="Naam" Description="Naam beheerder" DataType="CSTRING" Size="41" ScreenPicture="@s40" ScreenPrompt="Naam beheerder:" ReportHeading="Beheerder" Message="Naam beheerder" ReportControl=" STRING(@s40),USE(Alg201:Naam)">
<WindowControl>
<Line Text=" PROMPT('Naam beheerder:'),USE(?Alg201:Naam:Prompt)"/>
<Line Text=" ENTRY(@s40),USE(Alg201:Naam),MSG('Naam beheerder'),REQ"/>
</WindowControl>
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedVersionNumber="1"/>
<Validity Check="NONZERO"/>
</Field>
From this file I want ident,name,description,prefix from the first row where tag is <table Guid=.
So it loads prefix en ident from this first row because they only exists there, but name and description are used several times and I only get to see the last name and description.
This is the command :
XmlTable.load(TableDict,lFileName,'','Table')
Hope someone can help me.
Joep
I'm using Xfiles to make me a table summary of the dictionary.
To do so I make an export of the dictionary.
This is a piece of that dictionary output.
<Table Guid="{07975131-522f-43f1-992f-48d3ae016a18}" Ident="9" Name="Alg201" Description="Beheerders" Prefix="Alg201" Driver="MSSQL" Owner="!Glo:ConnectString" Path="!GFN:Alg201" Thread="true" Bindable="true">
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedDate="16 MAY 2018" ModifiedTime=" 1:14:19PM" ModifiedVersionNumber="1"/>
<Field Guid="{f352d24a-ecb6-4e3d-af9e-bb2b8f054f3c}" Ident="98" Name="BehCode" Description="Code beheerder" DataType="LONG" Size="4" ScreenPicture="@N6_" ScreenPrompt="Code:" ReportHeading="Code" Message="Code beheerder" ReportControl=" STRING(@N6_),USE(Alg201:BehCode)">
<WindowControl>
<Line Text=" PROMPT('Code:'),USE(?Alg201:BehCode:Prompt)"/>
<Line Text=" ENTRY(@N6_),USE(Alg201:BehCode),MSG('Code beheerder'),REQ"/>
</WindowControl>
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedDate="18 JUN 2015" ModifiedTime=" 4:46:11PM" ModifiedVersionNumber="1"/>
<Validity Check="NONZERO"/>
</Field>
<Field Guid="{35ae3c1d-26d4-4e71-bc29-23109131b07d}" Ident="99" Name="Naam" Description="Naam beheerder" DataType="CSTRING" Size="41" ScreenPicture="@s40" ScreenPrompt="Naam beheerder:" ReportHeading="Beheerder" Message="Naam beheerder" ReportControl=" STRING(@s40),USE(Alg201:Naam)">
<WindowControl>
<Line Text=" PROMPT('Naam beheerder:'),USE(?Alg201:Naam:Prompt)"/>
<Line Text=" ENTRY(@s40),USE(Alg201:Naam),MSG('Naam beheerder'),REQ"/>
</WindowControl>
<Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1" ModifiedUser="Administrator" ModifiedVersionNumber="1"/>
<Validity Check="NONZERO"/>
</Field>
From this file I want ident,name,description,prefix from the first row where tag is <table Guid=.
So it loads prefix en ident from this first row because they only exists there, but name and description are used several times and I only get to see the last name and description.
This is the command :
XmlTable.load(TableDict,lFileName,'','Table')
Hope someone can help me.
Joep
11
Web Server - Ask For Help / xml string not resulting in an correct word document
« on: January 10, 2018, 06:25:50 AM »
Hi There,
I have build a webservice which recieves xml's containing images, word ducuments and pdf's.
In my code I decode the base64 encoded string and save it as blob in the database:
If Clip(fo:data)
LenCoded = len(clip(fo:data))
Clear(StringDecoded)
str.SetValue(Clip(StringDecoded))
NetBase64DecodeEx(fo:data,StringDecoded,LenCoded)
str.SetValue(Clip(StringDecoded))
str.ToBlob(Upl:ImageBlock)
END
When I save this later to a file from the database only images show themselves correctly.
The pdf and the word document are complaining about damaged content.
If I click a few times in word, word resolves this problems and shows correctly afterall.
If I take the strings out of the xml and feed them to an bas64 decode website tool they both show correctly.
Can someone tell me what I'm doing wrong?
Regards Joep
I have build a webservice which recieves xml's containing images, word ducuments and pdf's.
In my code I decode the base64 encoded string and save it as blob in the database:
If Clip(fo:data)
LenCoded = len(clip(fo:data))
Clear(StringDecoded)
str.SetValue(Clip(StringDecoded))
NetBase64DecodeEx(fo:data,StringDecoded,LenCoded)
str.SetValue(Clip(StringDecoded))
str.ToBlob(Upl:ImageBlock)
END
When I save this later to a file from the database only images show themselves correctly.
The pdf and the word document are complaining about damaged content.
If I click a few times in word, word resolves this problems and shows correctly afterall.
If I take the strings out of the xml and feed them to an bas64 decode website tool they both show correctly.
Can someone tell me what I'm doing wrong?
Regards Joep
12
Web Server - Ask For Help / compile errors since nettalk 10.07
« on: September 29, 2017, 04:01:43 AM »
Hi All,
I got a lot of compile erros since I moved to nettalk 10.07
One part of these errors is an unresolved error in map\release
Unresolved External CONSTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External DESTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External CONSTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External DESTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
And these
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetDrive.Clw
Unknown procedure label - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
Field not found: CAT - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
Unknown procedure label - C:\Clarion10\Accessory\libsrc\win\ NetLDAP.Clw
Hope someone can help me
Regards Joep
I got a lot of compile erros since I moved to nettalk 10.07
One part of these errors is an unresolved error in map\release
Unresolved External CONSTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External DESTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External CONSTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
Unresolved External DESTRUCT@F9NETSIMPLE in la10off003.obj - C:\Clarion10\apps\Aag2018Sql\map\release\ la10off.MAP
And these
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetDrive.Clw
Unknown procedure label - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
Field not found: CAT - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
No matching prototype available - C:\Clarion10\Accessory\libsrc\win\ NetHttp.Clw
Unknown procedure label - C:\Clarion10\Accessory\libsrc\win\ NetLDAP.Clw
Hope someone can help me
Regards Joep
13
Web Server - Ask For Help / how to implement autoincrement in update form afterwords
« on: May 23, 2014, 01:58:14 AM »
Hi All
I have generated an webapplication with several browses and forms.
In the database (sql server) I have several key's with an identity.
But I haven't got auto increments on those key's in the dictionary.
Unfortunally, implementing these increments in the dct, generates no extra code by the templates.
I tried to implement the code by myself but it doesn't work. (form is not primed)
code I used at the preinsert and precopy:
! Start of "Pre Insert After Primes"
! [Priority 5000]
p_web.PrimeFile(Smp_Algemeen,true,0)
Ans = Net:ChangeRecord
p_web.SetSessionValue('UpdateSmp_Algemeen:Primed',1)
! End of "Pre Insert After Primes"
What am I doing wrong?
Regards,
Joep
I have generated an webapplication with several browses and forms.
In the database (sql server) I have several key's with an identity.
But I haven't got auto increments on those key's in the dictionary.
Unfortunally, implementing these increments in the dct, generates no extra code by the templates.
I tried to implement the code by myself but it doesn't work. (form is not primed)
code I used at the preinsert and precopy:
! Start of "Pre Insert After Primes"
! [Priority 5000]
p_web.PrimeFile(Smp_Algemeen,true,0)
Ans = Net:ChangeRecord
p_web.SetSessionValue('UpdateSmp_Algemeen:Primed',1)
! End of "Pre Insert After Primes"
What am I doing wrong?
Regards,
Joep
14
Web Server - Ask For Help / saving uploaded image as blob
« on: April 16, 2014, 06:20:48 AM »
Hi all,
We have got an web application created with nettalk 8.03 and clarion 9.0.
I'd like to perform some actions:
1) upload foto or sound and save it as a blob in the database.
2) view the foto's that already have been saved as blob
In the dictionary I have:
- imagename (which is an string, used as name identification of the image)
- imageblock (which is an blob)
I can upload an image, but it is saved on disk in the web/upload folder instead of saving it as a blob.
Can anyone tell me, what to do and where, to save the image as an blob instead?
And how to view it afterwards
Regards
Joep
We have got an web application created with nettalk 8.03 and clarion 9.0.
I'd like to perform some actions:
1) upload foto or sound and save it as a blob in the database.
2) view the foto's that already have been saved as blob
In the dictionary I have:
- imagename (which is an string, used as name identification of the image)
- imageblock (which is an blob)
I can upload an image, but it is saved on disk in the web/upload folder instead of saving it as a blob.
Can anyone tell me, what to do and where, to save the image as an blob instead?
And how to view it afterwards
Regards
Joep
15
Web Server - Ask For Help / problem reaching Apple's Notification service (webservice)
« on: September 12, 2013, 01:12:19 AM »
Hi There,
I 'am having trouble reaching the APNS (apple Notification Service).
I get following error:
"Connection failed to open NetError = -66 SSLError = 0 WinsockError = 0"
I'm not sure what this error means.
Is there somewhere a list with explanation of all NetError's and SSLError's?
This is my code, hope someone can help me:
!Stuur push bericht
!Init
apnsHost = 'gateway.sandbox.push.apple.com'
!apnsHost = '17.172.233.65'
apnsCert = 'certificaten\cert.pem'
apnsKey = 'certificaten\key.pem'
apnsRoot = 'certificaten\AppleIncRootCertificate.pem'
apnsPort = '2195'
apnsUrl = apnsHost & ':' & apnsPort
unixDate = Today() - Deformat('19700101',@d12)
unixTime = (UnixDate * 86400) + Round(Clock()/100,1)
unixExpiry = st.LongToHex(unixTime + 86400) ! add 1 day
st.SetValue(unixExpiry)
st.FromHex()
apnsExpiry = st.GetValue()
Message('JulianDate=' & Today() & ' 01/01/1970=' & Deformat('19700101',@d12) & ' Time=' & Round(Clock()/100,1) & ' UnixDate=' & UnixDate & ' unixTime=' & unixTime & ' unixExpiry=' & Clip(unixExpiry) & ' hex=' & apnsExpiry)
json = '{{"aps" : {{ "alert" : "Hallo mijn eerste push bericht", "badge" : 1, "sound" : "default" } }'
!json = '{{"aps" : {{ "alert" : "Hallo mijn eerste push bericht", "badge" : 1, "sound" : "default" } }'
!SETCLIPBOARD(json)
deviceToken = '0b9e08cdd8baa77rdes34s3gfhh4565ggh57uhf4543gbcfc38173'
!PostString = Chr(0) & Chr(0) & Chr(32) & DeviceToken & Chr(0) & Chr(Len(Clip(json))) & Clip(jSon)
PostString = Chr(1) & '1234' & apnsExpiry & Chr(32) & DeviceToken & Chr(0) & Chr(Len(Clip(json))) & Clip(jSon)
net.CanUseProxy = 1 ! Can use a proxy
net.HeaderOnly = 0 ! We want the whole page
net.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
net.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
net.InActiveTimeout = 9000 ! Set IdleTimeout 90 seconds
net.ConnectionKeepAlive = 0
! These settings would be required if you were talkig to a SOAP server that only did SSL.
Net.SSL = 1
net.SSLCertificateOptions.CertificateFile = apnsCert
net.SSLCertificateOptions.PrivateKeyFile = apnsKey
net.SSLCertificateOptions.CARootFile = apnsRoot !'.\CaRoots.pem'
net.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
net.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
! If https use a root cluster like '.\CA_Roots.pem'
!net.AsyncOpenUse = 1
!net.AsyncOpenTimeOut = 1200 ! 12 sec
!net.InActiveTimeout = 9000 ! 90 sec
net.ContentType = 'text/xml; charset=utf-8'
net.AcceptEncoding = ''
net.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
!net.customheader = 'SOAPAction: "http://www.egem.nl/StUF/sector/bg/0310/aoaLv01"'
SetCursor(Cursor:Wait)
net.Post(apnsUrl, PostString)
If net.Error
Message ('Could not post the request to this web service. Error ' & net.Error & ': ' & net.InterpretError())
SetCursor()
End
Regards Joep
Clarion 6,3
Nettalk 7,05
I 'am having trouble reaching the APNS (apple Notification Service).
I get following error:
"Connection failed to open NetError = -66 SSLError = 0 WinsockError = 0"
I'm not sure what this error means.
Is there somewhere a list with explanation of all NetError's and SSLError's?
This is my code, hope someone can help me:
!Stuur push bericht
!Init
apnsHost = 'gateway.sandbox.push.apple.com'
!apnsHost = '17.172.233.65'
apnsCert = 'certificaten\cert.pem'
apnsKey = 'certificaten\key.pem'
apnsRoot = 'certificaten\AppleIncRootCertificate.pem'
apnsPort = '2195'
apnsUrl = apnsHost & ':' & apnsPort
unixDate = Today() - Deformat('19700101',@d12)
unixTime = (UnixDate * 86400) + Round(Clock()/100,1)
unixExpiry = st.LongToHex(unixTime + 86400) ! add 1 day
st.SetValue(unixExpiry)
st.FromHex()
apnsExpiry = st.GetValue()
Message('JulianDate=' & Today() & ' 01/01/1970=' & Deformat('19700101',@d12) & ' Time=' & Round(Clock()/100,1) & ' UnixDate=' & UnixDate & ' unixTime=' & unixTime & ' unixExpiry=' & Clip(unixExpiry) & ' hex=' & apnsExpiry)
json = '{{"aps" : {{ "alert" : "Hallo mijn eerste push bericht", "badge" : 1, "sound" : "default" } }'
!json = '{{"aps" : {{ "alert" : "Hallo mijn eerste push bericht", "badge" : 1, "sound" : "default" } }'
!SETCLIPBOARD(json)
deviceToken = '0b9e08cdd8baa77rdes34s3gfhh4565ggh57uhf4543gbcfc38173'
!PostString = Chr(0) & Chr(0) & Chr(32) & DeviceToken & Chr(0) & Chr(Len(Clip(json))) & Clip(jSon)
PostString = Chr(1) & '1234' & apnsExpiry & Chr(32) & DeviceToken & Chr(0) & Chr(Len(Clip(json))) & Clip(jSon)
net.CanUseProxy = 1 ! Can use a proxy
net.HeaderOnly = 0 ! We want the whole page
net.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
net.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
net.InActiveTimeout = 9000 ! Set IdleTimeout 90 seconds
net.ConnectionKeepAlive = 0
! These settings would be required if you were talkig to a SOAP server that only did SSL.
Net.SSL = 1
net.SSLCertificateOptions.CertificateFile = apnsCert
net.SSLCertificateOptions.PrivateKeyFile = apnsKey
net.SSLCertificateOptions.CARootFile = apnsRoot !'.\CaRoots.pem'
net.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
net.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
! If https use a root cluster like '.\CA_Roots.pem'
!net.AsyncOpenUse = 1
!net.AsyncOpenTimeOut = 1200 ! 12 sec
!net.InActiveTimeout = 9000 ! 90 sec
net.ContentType = 'text/xml; charset=utf-8'
net.AcceptEncoding = ''
net.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
!net.customheader = 'SOAPAction: "http://www.egem.nl/StUF/sector/bg/0310/aoaLv01"'
SetCursor(Cursor:Wait)
net.Post(apnsUrl, PostString)
If net.Error
Message ('Could not post the request to this web service. Error ' & net.Error & ': ' & net.InterpretError())
SetCursor()
End
Regards Joep
Clarion 6,3
Nettalk 7,05
Pages: [1] 2