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
16
And this is what I get back from soapUI

<html class="no-js">
   <head>
      <meta content="HTML Tidy for Java (vers. 26 sep. 2004), see www.w3.org" name="generator"/>
      <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/>
      <link type="text/css" rel="stylesheet" href="/styles/error.css"/>
      <title>404 The page cannot be found</title>
   </head>
   <body class="ErrorPage">
      <div class="ErrorDiv">
         <hr/>
         <h1>The page cannot be found</h1>
         The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
         <br/>
         <br/>
         <hr/>
      </div>
   </body>
</html>

17
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
   

18
Hi Jane,

You are wonderful.
Your openssl solution with the key certificate works.
My reaction is a bit late, but my client's office was closed yesterday (day off in the Netherlands)
ps thank you too Bruce,but your suggestions wheren't necessary.

Regards Joep

19
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



20
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

21
Hi Bruce,

The file appears to be "Pdf" and not Word.
Although the extension tag is <FileExtension>.docx</FileExtension>
Very confusing.
But the code works well.

Thanks,
Joep

22
The save is working know, but the word file seems to be corrupted.

23
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
 

24
Hi Bruce,

Your last remark did the trick.
after setting   cSoap.OptionAutoCookie = true   I get the right response.

Thanks again,
Joep

25
Hi Bruce,

I removed all the messages and error handlings.
So I don't get any error. the posts get a nice message back
But I still got a not connected message back.
This is my packetrecieved embed:

If Self.ThisPage.Length() > 0
   PacketReceived = Self.ThisPage.GetValue()
   str.SetValue(PacketReceived)
End
If lCountRequest = 0
   lResult = str.Between('<ConnectResult>','</ConnectResult>')
   If lResult = 'true'
      Do PostCorsaVersie !Is the second post
      lCountRequest=1
   Else
      !Message('Connectie met Corsa niet gelukt!')
      Post(EVENT:CloseWindow)
   End
Else
   lExtensie=str.Between('<FileExtension>','</FileExtension>')
   lFile=str.Between('<FileBytes>','</FileBytes>')   
   str.SetValue(lFile)
   str.Base64Decode()
   lFileName='e:\temp\' & Clip(Glo:DmsLastDoc) & Clip(lExtensie)
   str.SaveFile(lFileName)
   If Exists(lFileName) Then ShowFoto(lFileName).
End

And this is what I'm getting back from the second post:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsa:Action>http://bct.nl/GetFileVersionResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:490fae00-8b6f-4766-9622-311c63432284</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:a5fc6d82-59ab-44a2-b25e-57c9a73b3966</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-356a5795-e554-4925-9ad7-9d1da6b1731f">
            <wsu:Created>2018-08-03T07:00:29Z</wsu:Created>
            <wsu:Expires>2018-08-03T07:05:29Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <GetFileVersionResponse xmlns="http://bct.nl">
         <GetFileVersionResult>false</GetFileVersionResult>
         <LastError>Unable to execute function, not connected or session was abandoned</LastError>
      </GetFileVersionResponse>
   </soap:Body>
</soap:Envelope>


26
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

27
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(&apos;Code:&apos;),USE(?Alg201:BehCode:Prompt)"/>
            <Line Text=" ENTRY(@N6_),USE(Alg201:BehCode),MSG(&apos;Code beheerder&apos;),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(&apos;Naam  beheerder:&apos;),USE(?Alg201:Naam:Prompt)"/>
            <Line Text=" ENTRY(@s40),USE(Alg201:Naam),MSG(&apos;Naam beheerder&apos;),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


28
Hi Bruce,

It works.
I got to use more StringTheory.

Thanks again,
Joep

29
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

30
Web Server - Ask For Help / Re: compile errors since nettalk 10.07
« on: October 01, 2017, 10:22:23 PM »
Hi Bruce,

I'm up and running again.
Thanks so much.

Regards Joep

Pages: 1 [2] 3 4