NetTalk Central

Show Posts

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.


Messages - joep

Pages: 1 2 [3] 4
31
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

32
Web Server - Ask For Help / Re: xml load with xfiles
« on: March 13, 2013, 12:29:22 AM »
Thanks Bruce

That was indeed the problem.
I have been working with queue's all along and did forget to use a simular file embed.
At least now I can move on to the multiple "gebruiksdoel" tags challenge.

@Rene you me contact me of course
my mail is firstname dot borghans at bentis dot ourcountry.
[bruce edited the email to prevent spam]

33
Web Server - Ask For Help / Re: xml load with xfiles
« on: March 12, 2013, 11:49:54 AM »
Hi Bruce,

I was not at my office this afternoon, that's why I did a quick reply.
Like I said before I want to get the key of the parent table in the child table.
In my example BagAOA is the parent and BagTGO the child.
The field identificatie is put into the field identificatie_bag by the embed AddQueueRecord.
The only thing is that it is not getting there and the field identificatie_bag stays empty.
Besides that I need to find a way to read the multiple "gebruiksdoel" tag's.

cheers Joep

34
Web Server - Ask For Help / Re: xml load with xfiles
« on: March 12, 2013, 05:37:36 AM »
Hi Bruce ,

THE identicatie in THE parent should appear in THE child under identificatie_bag

Cheers Joep

35
Web Server - Ask For Help / Re: xml load with xfiles
« on: March 11, 2013, 11:03:43 PM »
Hi Bruce

I have included an app called loadxml63.
Clarion version 6.3

Cheers Joep

[attachment deleted by admin]

36
Web Server - Ask For Help / Re: xml load with xfiles
« on: March 11, 2013, 07:25:53 AM »
Hi all,

I now use memory tables but i'am still not able to load my xml.
I have bin looking at the inv example from nettalk.
Both memory tables are loaded like the "inv" example, but I can't get the relationship wright.
The assignfield embed works because the child table is loaded with the correct fields.
The problem for now is the addqueuerecord for the child table.
Somehow this embed is not fired.
Does anyone know what the problem could be?

Regards Joep

37
Web Server - Ask For Help / xml load with xfiles
« on: February 22, 2013, 06:47:52 AM »
Hi all,

I want to load an xml file into 2 queue’s which should be related.
I have got a master record and one or more child records.
I thought I could do this with 2 load commands.
The first on the master is no problem, but the second one on the child I can’t get right.
I would suppose I do a load(BagQueue,file,’antwoord’,’object’) for the master
And a load(TgoQueue,file,’antwoord’,’gerelateerde’) for the child, but then I always get the last one only.
Another question is how to get the multiple "gebruiksdoel" into the TgoQueue.

These are my queue’s:
Child queue:
TgoQueue                 QUEUE,PRE(tgo)
identificatie              STRING(20)
identificatie_bag          STRING(20)
puntGeometrie            STRING(20)
gebruiksdoel               STRING(30)         (I should probably make 5 of these, see the example)
bouwjaar                   STRING(10)
                         END
Master queue:
BagQueue                 QUEUE,PRE(bg)
identificatie              STRING(20)
woonplaatsNaamNen          STRING(30)
identificatie_opr          STRING(20),NAME('opr.identificatie')
openbareRuimteNaam         STRING(30)
huisnummer                 STRING(10)
huisletter                     STRING(10)
huisnummertoevoeging  STRING(10)
postcode                   STRING(10)
StraatNaam                 STRING(30)
                         END
Can anyone help me?

Regards
Joep

[attachment deleted by admin]

38
Hi Bruce,

I designed it to be small and only for an Iphone or an other smartphone.
Setting mode to desktop is like I see it on the desktop.
That means inline and with the proper padding all the way.
But I just liked it better in mobile mode.
Well that means I have to do a little bit more work to let it look nice on the phone.

The only thing I found earlier to get the phone to dial is to let it execute the following xhtml code.
'<a href="tel:' & p_web.gsv('POS022:Telefoon') & '">call</a>'
But I have no idea how.
In the On Click dialog is no option voor xhtml.

Thanks,
Joep


39
Hi All,

Hope somebody can help me.
I made a mobile website especially for a smartphone.
When I open this website in firefox everything is fine.
I have made a custom.css to make this possible.
No padding between fields and fields properly inline.
When I open it in the smartphone (Iphone) the browses show fine,
but the forms have lost the size adjustment and fields have got a lot of space between each other and above that there not inline anymore.
Does someone have an explanation for this behavior?

Something else I want to ask is how I can hyperlink a telephone field to dial that number?

NT 6.44
Build 8.0.9661

Kind Regards
Joep Borghans

40
Bruce

You are Terrific

Thanks Joep

41
Hi all,

I have moved my clarion 8 install.
After that I couldn't open my webapplication because an registry item was missing:
"GEN: Registry item NetTalk NetWebBrowse no longer exists"
Anyone an idea how to fix this?

Regards,
Joep

42
The Rest - Ask For Help / Re: xml boundary is not getting the expected lines
« on: September 12, 2012, 12:34:43 AM »
Hi Bruce,

Is there no way to get to the first <guid>, <ident> en <name> values in the <table line?
An other possibillity would be to replace these tags with a "Table" prefix (<Tableguid) so they become unique for a table line.
But then I still have to spent some work to "fix" the xml before I import it.
My goal is to compare the Guid and Ident values for all table, fields en keys of both dictionary's,

Thanks Joep

43
Hi all,

I'm trying to compare 2 xml files. Actually 2 exported dictionary's.
This is the example of one:

<?xml version="1.0" encoding="UTF-8"?>
<Dictionary Name="aagwin" Version="1" DctxFormat="4">
   <Table Guid="{314a1615-7fe0-4c3e-8b83-ccff9bf2f3a8}" Ident="96" Name="Alg000">
      <Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1"/>
      <Field Guid="{d0373689-0dbd-4ba0-9b58-8d13f4ac6b05}" Ident="7092" Name="RecId" DataType="LONG" Size="4" ScreenPicture="@n-14">
         <WindowControl>
            <Line Text=" PROMPT(&apos;Rec Id:&apos;),USE(?Alg000:RecId:Prompt)"/>
            <Line Text=" ENTRY(@n-14),USE(Alg000:RecId),REQ"/>
         </WindowControl>
         <Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1"/>
         <Validity Check="NONZERO"/>
      </Field>
      <Field Guid="{aaf2b4ea-a3c6-483d-9155-e9cb6d5b4f95}" Ident="1462" Name="MutDat" DataType="STRING" )">
         <WindowControl>
            <Line Text=" PROMPT(&apos;Mut Dat:&apos;),USE(?Alg000:MutDat:Prompt)"/>
            <Line Text=" ENTRY(@s8),USE(Alg000:MutDat)"/>
         </WindowControl>
         <Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1"/>
         <Validity Check="NOCHECKS"/>
      </Field>
           <Key Guid="{d5ef9fcb-8fe3-4e23-96ca-10a64578b530}" Ident="884" Order="1" Name="PK_Alg000" KeyType="KEY" Unique="true">
         <Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1"
         <Component Guid="{d7b8dcfe-8bf3-44c2-afeb-e724450f4790}" FieldId="{d0373689-0dbd-4ba0-9b58-8d13f4ac6b05}" Order="1" Ascend="true">
            <Audit CreateUser="Administrator" CreateDate="25 JUN 2012" CreateTime="12:01:56PM" CreateVersionNumber="1"/>
         </Component>
      </Key>
   </Table>
</Dictionary>

I do a  xml.load(queue,xmlfile,'Dictionary','Table')
But I keep getting the Ident and Name values from the last tag <Key
Instead of the ones from the <table line.
Can someone explain me what I'm doing wrong.

Thanks Joep
Clarion C8
Xfiles 2.33

44
The Rest - Ask For Help / Re: Soap and ssl what certificates to use
« on: July 17, 2012, 05:13:08 AM »
Hi Bruce,

I have looked at your example.
Created an certificate like the windows way with certmanager.
So I got a private part of the certificate in the store and a public part which I gave to the webservice side.
I installed the certificate I got fom the webservice and on the webservice side my client certificate is installed. Both trusted in the certificate store.
And when If browse the url everything is fine.
But when I use my application with the public certificate as option I get a "the open command timed out".
I also tried using the CARoot.pem in which I copied the the base 64 export of the certificate, but then I get a non trusted message of the client certificate back from the webservice.
I'am a bit confused.
What should I use to encrypt the xml which I send?

These are the settings now:

         IF Glo:BagCertificaat Then net.SSLCertificateOptions.CertificateFile = Glo:BagCertificaat.
!        net.SSLCertificateOptions.PrivateKeyFile = Glo:BagPrivateKey
         net.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
         net.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
         IF Glo:BagCaRoot Then net.SSLCertificateOptions.CARootFile = Glo:BagCaRoot.

Regards Joep

45
Hi Bruce,

The exact message is:
Assertion failed on line 583 in file ABFILE.clw. Message: The file is still open. Open Counter is 0 on file: C:|Clarion6\Apps\WellCareTest\BENTUSR.TPS Shall I GPF?

Pages: 1 2 [3] 4